美文网首页
Neo4j Cypher update relationship

Neo4j Cypher update relationship

作者: kinkyboots | 来源:发表于2017-12-07 09:39 被阅读37次

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

neo4j cypher: how to change the type of a relationship

相关文章

网友评论

      本文标题:Neo4j Cypher update relationship

      本文链接:https://www.haomeiwen.com/subject/gsarixtx.html