Hi Guys..
I created this following trigger to create relationship between two nodes when ever another node is inserted
"UNWIND apoc.trigger.nodesByLabel($assignedLabels, 'Mgr) AS node
MATCH (s:Member { empId:node.baseId }),(d:Member { empId:node.newabaseId })
CALL apoc.merge.relationship.eager(s, node.country,{},{country:node.country}, d,{memberId:node.memberId,sponsorId:node.sponsorId,country:node.country}) YIELD rel
DETACH DELETE node",
{ phase: 'after' }):
For example
A------->B with relation property COUNTRY AS INDIA
later same A change sponsor to C
A--------->C WITH country as JPN.
Now we need to remove that Existing relationship ship and replace this one..
How can u perform this..
Is there any special trigger available for this?