How should I bound relationships in merge? For example, the following query works fine.
MERGE (dummy{name:'dummy'})-[r0:PARENT_OF]->(s0)
MERGE (dummy)-[:PARENT_OF]->(s0)-[:PARENT_OF]->(s1)
But it adds two relationships between dummy and s0.
When I add r0 to the second merge it gives me "Variable r0
already declared":
MERGE (dummy{name:'dummy'})-[r0:PARENT_OF]->(s0)
MERGE (dummy)-[r0:PARENT_OF]->(s0)-[:PARENT_OF]->(s1)
Also, the same error if I remove :PARENT_OF from it:
MERGE (dummy{name:'dummy'})-[r0:PARENT_OF]->(s0)
MERGE (dummy)-[r0]->(s0)-[:PARENT_OF]->(s1)
The nodes "dummy" and "s0" are bound correctly.