cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Copy relationship details into multiple relationship

A node can have 1-2 relationships with a node. Either a node leads another node i.e (A)-[:Leads{subtype:"1"]->(B) or a node mentors another node similar format as Leads above or a node leads and mentors a node so A=B (both lead and mentor relationship type).

Now if we come to know another node that was in between two nodes the node should be added appropriately i.e if C  should be in-between A and B it should be created and the relationships should be copied along with their types and properties while the original direct relationship is deleted

So A-B -> A-C-B or A=B -> A=C=B (the relationships should be copied dynamically)

Similarly if a nodes turns out to be no longer part of the path it should be deleted along with the relationships so A-C-B -> A-B (if c is no longer needed)

there will be multiple paths following one of the two operations mentioned (reuploading in the correct criteria as i saw the message)

3 REPLIES 3

i understand that the relationship should be duplicated for an insert. What behavior do you want to occur when deleting the middle node? Which relationship do you retain or can you assume the are identical? 

Hi @glilienfield 

Yes i am assuming they are identical when i am deleting them so either one can be retained

Try_throw
Node

Hi @glilienfield 

Yes i am assuming they are identical when i deleting them so either one can be retained