for each existing 'product' that 'inside' a 'category', I would like to add
a property in relationship 'product->category'. When I run below cypher, it
create a new relationship instead of adding new property in the existing
one...how can I make it 1 relationship only?
1) Existing relationship before change
(p:Product)-[r:inside]->(c.Category)
there is no property in [ r ]
2) Cypher to run
MATCH (p:Product), (c:Category)
MERGE (p)-[r:inside {type: p.id + '->' + c.id }]->(c)
3) it creates new relationship and the existing no change
(p:Product)-[r:inside {type: p.id->c.id }]->(c:Category)
(p:Product)-[r:inside]->(c:Category)
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.