DataStax Studio : Update an integer property of node

27 Views Asked by At

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

1

There are 1 best solutions below

0
stephen mallette On BEST ANSWER

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()