环回将BLOB插入Oracle

loading...


0

我在尝试使用Loopback 3插入Oracle BLOB字段时遇到问题 .

Loopback代码是使用MySQL开发的,工作正常 . 我现在正在尝试切换到Oracle .

我正在调用我的 endpoints /sessionposting 数据:

{"USER_DEVICE_ID":20,
"SESSION_ID":"jQKCwhrnQgCGPqFn-LYwMiWWGTDBvnQi",
"SESSION_DATA":{"type":"Buffer","data":[97,98,99]},
"CREATED_DATE":"Mon Dec 10 2018 08:26:57",
"EXPIRY_DATE":"Mon Dec 10 2018 08:56:57"}

回应是:

{
  "error": {
    "statusCode": 500,
    "name": "Error",
    "message": "ORA-01465: invalid hex number",
    "errorNum": 1465,
    "offset": 127,
    "stack": "Error: ORA-01465: invalid hex number"
  }
}

EDIT:

这是我的模型配置:

"properties": {
"USER_DEVICE_ID": {
  "type": "number",
  "required": true
},
"SESSION_ID": {
  "type": "string",
  "required": true,
  "id": true
},
"SESSION_DATA": {
  "type": "buffer",
  "required": true
},
"CREATED_DATE": {
  "type": "date",
  "required": false
},
"EXPIRY_DATE": {
  "type": "date",
  "required": false
}

有任何想法吗?

谢谢 .

loading...

0回答

No Data

评论

暂时没有评论!