在Oriendb(2.1.2)中执行以下查询时,@rid返回负rid,实际上rid存在于rid key.Please中。有关更多解释,请参阅下面的内容
子查询:
select @rid from actions操作:
{
"result": [
{
"@type": "d",
**"@rid": "#-2:0",**
"@version": 0,
**"rid": "#12:24",**
"@fieldTypes": "rid=x"
}
],
"notification": "Query executed in 0.026 sec. Returned 1 record(s)"
}主查询:
INSERT INTO activityDetails SET name = "Dummy",actionMap ={"1":(**select @rid from action where start is not null**-->Returns a invalid Rid),"2":(select * from action where stop is not null)};操作:
com.orientechnologies.orient.core.exception.OValidationException: The field 'activityDetails.actionMap' has been declared as LINKMAP but the value is not a record or a record-id如何在子查询中用rid代替@rid?
发布于 2018-04-12 18:14:55
负值RID表示这是暂时的。当事务提交时,将分配一个真正的RID,这是因为在提交之后,RID被更改并在对象中更新。
当您执行插入操作时,selects?您可以通过输入select "limit 1“进行测试)
https://stackoverflow.com/questions/49772843
复制相似问题