Search code examples
databasedatastaxgremlindatastax-enterprisedatastax-enterprise-graph

DataStax Studio : Update an integer property of node


we have a vertex which has a property of type int and when I try to update that property for that node like

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

This query is not updating the record.

Is there any typecast I need to take care of while updating an int value from Datastax studio


Solution

  • That syntax is not correct. The properties() step gets a list of properties from the graph element (e.g. Vertex), but property() sets a property key and value, therefore your traversal should be written as:

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