【发布时间】:2021-05-30 23:53:08
【问题描述】:
在更新顶点属性下的docs中,提到可以“更新属性值而不向值集合添加附加值”
通过做g.V('exampleid01').property(single, 'age', 25)
在 gremlin_python 中,我无法运行上述查询。
我得到错误:
update_prop_overwrite = g.V().hasLabel('placeholder-vertex').property(single,'maker','unknown').next()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'single' is not defined
如何解决这个问题,以便可以替换 Neptune 中的 Vertex 属性值?
如果没有single,如果值已经存在,则查询会将新属性值附加到属性键。
【问题讨论】: