Suppose two node with a relationship. There is no direct way to 'update' a relationship, like 'rename'.
To update, use WITH
MATCH (n:User {name:"foo"})-[r:REL]->(m:User {name:"bar"})
CREATE (n)-[r2:NEWREL]->(m)
// copy properties, if necessary
SET r2 = r
WITH r
DELETE r
网友评论