我正在尝试使用orient db中的批处理URL向表中插入一些值。
这是json string。
{"transaction":true,"operations":[{"type":"script","language":"javascript","script":"var result2= db.command(\"insert into ChatConversation set ChatID = 19,Messages = 28:119\")"}]}
但这会产生错误。
错误:
{
"errors": [{
"code": 500,
"reason": 500,
"content": "com.orientechnologies.orient.core.exception.OValidationException: The field 'ChatConversation.Messages' has been declared as LINKLIST but an incompatible type is used. Value: [#28:119]"
}
]
}
请建议我解决这个问题。 提前谢谢
答案 0 :(得分:1)
要将数据插入LinkList,请使用以下语法:
insert into ChatConversation(Messages) values ([#28:119,#ANOTHER_RID,#THIRD_RID])