Neo4j 修改关系类型 type
没有直接修改的函数,也不需要,下面代码就可以:
原文地址:http://neo4j.com.cn/topic/585355a2e9ed9578733a2b6bMATCH (n:User {name:“foo”})-[r:REL]->(m:User {name:“bar”}) CREATE (n)-[r2:NEWREL]->(m) // 下面复制属性 SET r2 = r WITH r DELETE r
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