【发布时间】:2018-02-26 15:45:42
【问题描述】:
我在使用带有以下代码的 gremlin 更新 Orientdb 中的节点中的属性时遇到问题。 property 和 setProperty 似乎都不适用于 OrientDB。
g.V('@rid','#100').property('text','new updated text'))
g.V('@rid','#100').setProperty('text','new updated text'))
但是,我能够使用 OrientDB 支持的类似 SQL 的查询来更新节点。
update classname set text = 'new updated text' where @rid = #100
但我需要在 OrientDB 中使用 gremlin 查询来更新节点。我查看了 gremlin 查询教程,大多数人建议 .property('text','new updated text') 应该可以工作。
是不是 OrientDB 只支持有限的 gremlin 查询而不是全部?
【问题讨论】:
-
您使用的是哪个版本的 tinkerpop?
-
我使用的是使用 Tinkerpop 2.x 的 Orientdb 2.2 版