mergeV step.flagProp in onCreate option, and create/update all other properties in both onCreate and onMatch, something likegremlin> g.mergeV([(T.label):'stvertex']).
......1> option(Merge.onCreate,[flagProp:0, name:'test1']).
......2> option(Merge.onMatch,[name:'test2'])
==>v[17]
gremlin> g.V(17).elementMap()
==>[id:17,label:stvertex,name:test1,flagProp:0]
gremlin> g.mergeV([(T.label):'stvertex']).
......1> option(Merge.onCreate,[flagProp:0, name:'test1']).
......2> option(Merge.onMatch,[name:'test2'])
==>v[17]
gremlin> g.V(17).elementMap()
==>[id:17,label:stvertex,name:test2,flagProp:0]Join the Discord to ask follow-up questions and connect with the community
Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.
1,383 Members
Join