I want to copy existing relationships to a new node. All nodes already exist, and I would like to copy all incoming relationships to the second node. Given node D and a graph like
A -[r]-> B <-[s]- C
I would like to create the following in one Cypher request:
A -[r]-> B <-[s]- C A -[r]-> D <-[s]- C
Only relationships in the second row should be created, since all other nodes already exist. I tried the following Cypher request (which is an invalid request ( Don't know how to extract parameters from this type: org.neo4j.kernel.impl.core.RelationshipProxy )):
START targetNode = node(42) MATCH sourceNode -[r]-> targetNode CREATE sourceNode -[s:TYPE(r)]-> targetNode RETURN s
fynn source share