首页 > 解决方案 > DataStax Studio:更新节点的整数属性

问题描述

我们有一个具有 int 类型属性的顶点,当我尝试为该节点更新该属性时,例如

g.V().hasLabel("business").hasNot("authenticityScore").properties("authenticityScore",0).iterate()

此查询不更新记录。

从 Datastax Studio 更新 int 值时,我需要处理任何类型转换吗

标签: databasedatastaxgremlindatastax-enterprisedatastax-enterprise-graph

解决方案


该语法不正确。该properties()步骤从图形元素(例如 Vertex)获取属性列表,但property()设置属性键和值,因此您的遍历应写为:

g.V().hasLabel("business").hasNot("authenticityScore").
  property("authenticityScore",0).iterate()

推荐阅读