cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

Copy relationship details into multiple relationship

Try_throw
Node

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

glilienfield
Ninja
Ninja

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