OrientDB使用select语句创建边以设置属性

时间:2017-09-25 15:49:20

标签: orientdb graph-databases orientdb2.2

我想使用子查询创建边来设置属性。以下是我正在使用的查询:

create edge HAS from #57:0 to #80:3 set Type = (select from A where ID = 1)

这给了我以下错误:

OvalidationException:
The field 'HAS.Type' has been declared as LINK but the 
value is not a record or a record-id

请注意类型是LINK类型的属性。 感谢任何帮助!

1 个答案:

答案 0 :(得分:0)

以下是答案:

create edge HAS from #57:0 to #80:3 set Type = first((select from A where ID = 1))