Graph 使用gremlin查询更新Orientdb上的节点

Graph 使用gremlin查询更新Orientdb上的节点,graph,orientdb,gremlin,Graph,Orientdb,Gremlin,使用gremlin和以下代码更新Orientdb中节点的属性时遇到问题。属性和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 up

使用gremlin和以下代码更新Orientdb中节点的属性时遇到问题。属性和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','newupdated text')应该可以工作


是不是OrientDB只支持有限的gremlin查询,而不是所有查询?

您似乎在TinkerPop 2.x和3.x语法之间有点混淆。我对Tinkerpop2.x的记忆非常模糊,但我认为您只需要迭代遍历并使用第二种语法。因此,假设
g.V('@rid','#100')
返回一个顶点,您只需执行以下操作:

g.V('@rid','#100').next().setProperty('text','new updated text'))

您似乎在Tinkerpop2.x和3.x语法之间有点混淆。我对Tinkerpop2.x的记忆非常模糊,但我认为您只需要迭代遍历并使用第二种语法。因此,假设
g.V('@rid','#100')
返回一个顶点,您只需执行以下操作:

g.V('@rid','#100').next().setProperty('text','new updated text'))

您使用的是tinkerpop的哪个版本?我使用的是使用tinkerpop 2.x的Orientdb版本2.2。您使用的是tinkerpop的哪个版本?我使用的是使用tinkerpop 2.x的Orientdb版本2.2