Closed ahrennsiva closed 8 years ago
The fastest way is using a Cypher query
match (node { id_prop: XX })-[r:RELATIONSHIP_TYPE]->() delete r;
Using the neo4jrestclient
API you would need to iterate over all the relationships and delete them one by one. It can be done in a transaction, but I would still recommend using a Cypher query.
for rel in node.relationships.outgoing(types=["RELATIONSHIP_TYPE"]):
rel.delete()
I have generated a set of nodes along with relationships & I would like to delete all relationships of a certain type for that node. I have student nodes and major nodes that are connected, and upon deletion of a major by a student, I want to remove the relationship of this type. How would I go about doing this?