Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-02-2020 05:09 AM
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?
10-02-2020 05:15 PM
I'm having a difficult time understanding exactly what you're trying to do.
Perhaps mock up a simple example at console.neo4j.org, and share it?
note: the Cypher you shared has an unclosed quote: , 'Mgr) AS node
Please try to be as specific as you can when describing your problem:
To help you, we need a better idea of what your graph looks like, what will be changed, and how you want that graph to look after the change.
All the sessions of the conference are now available online