Ad

Update A Property Value Without Adding An Additional Value, In Gremlin_node

- 1 answer

I have written this gremlin query to update a property:

g.V("7cb57dad-d261-29cb-b886-affcd7442b73").property('tname', "updated tribename")

Is this the correct way to update a property in gremlin-node? Or do I have to pass in single property to update a property without adding additional value?

Ad

Answer

If you want to replace the prior value then you need the single keyword to be explicitly specified as in:

g.V("7cb57dad-d261-29cb-b886-affcd7442b73").
  property(single, 'tname', "updated tribename")
Ad
source: stackoverflow.com
Ad