neography / neo4j change relationship end point to

2019-07-24 16:14发布

问题:

i am using neography as wrapper of the REST api for Neo4j graph database. I often need to change the end node of a relationship, but i am not able to do this using neography.

Of course, i can delete the relation then recreate it with the new end point node, but it's not optimized.

Does anyone had this problem?

Thanks.

回答1:

Neo4j does not allow replacing the nodes of a relationship (see javadoc). So you only can create a new relationship to the new end node and delete the other relationship.