Reputation: 21984
I am not able to find the API to delete relationships from a Node, I could only find a create method. Please let me know how I can delete it.
Upvotes: 0
Views: 464
Reputation: 669
That's exactly right:
rel = n1.relationships.create("Knows", n2)
rel.delete()
And that's it.
Upvotes: 1
Reputation: 39905
Don't know exactly about the python library but my understanding is that it mimics the Java API.
In Java API you'd use:
for (Relationship r: myNode.getRelationships()) {
r.delete();
}
I guess the same concept is valid for python's neo4jrestclient as well: get all relationships of a node and call the delete()
method on them.
Upvotes: 1