How to delete a node and its connected nodes with Neo4j cypher query?
问题 For example, I want to delete Actor node with id = "005A" and its connected Movie nodes. The relationship between Actor and Movie node is ACTED_IN . I have tried this cypher query: MATCH (a:Actor {id: "005A"}) OPTIONAL MATCH (a)-[r:ACTED_IN]->(m) DELETE a, r, m; but it didn't work, I got TransactionFailureException: Unable to commit transaction error. Anyone can give a solution? UPDATE: I found out that there is relationship from other node ( Agency ) to Actor node which labeled as OWNED . So