1

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.

Charlotte Skardon
  • 6,220
  • 2
  • 31
  • 42
7vingt
  • 301
  • 2
  • 16

1 Answers1

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.

James
  • 11,654
  • 6
  • 52
  • 81