graph databases - How to add multiple value for a relationship properties in neo4j? -
i want add multiple value single relationship properties.
below..
have relation "called" bidirectional.i want have 2 value "duration" duration (100-200->500,200-100->600)
can put 2 values single proeprties??
you can use property having array of strings value:
merge (a:person{number:'123'}) merge (b:person{number:'456'}) merge (a)-[r:called]->(b) on create set r.duration = ["100-200->500"] on match set r.duration = ["100-200->500"]
later on when adding second duration value, use
merge (a:person{number:'123'}) merge (b:person{number:'456'}) merge (a)-[r:called]->(b) on match set r.duration = n.duration + "200-100->600"
n.b. "+" operator on array amends new element array.
Comments
Post a Comment