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) enter image description here

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

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -