0
votes

Works on 2.3.3, doesn't work on 3.0.1 :

MATCH PATH=((:DELETE_AFTER_TEST_DeleteNode)-[*0..2]-()) FOREACH (NODE IN NODES(PATH) | DETACH DELETE NODE)

Error in Java

org.neo4j.ogm.exception.CypherException: Error executing Cypher
"Neo.ClientError.Statement.EntityNotFound"

Error on browser

Unable to load NODE with id 741969

The following query in the browser returns a node (id: 741968) that is linked to node 741969

MATCH (N:DELETE_AFTER_TEST_DeleteNode) RETURN N

How do I delete all nodes in a small graph, given a "root" node using ID or a label, without getting a NEO4J 3.0.1 exception?

Thanks

1
These are all statements about what happened. What is your question? Please see the guide for how to ask and create a Minimal, Complete, and Verifiable example.tmthydvnprt

1 Answers

0
votes
    MATCH PATH=((A:SOME_UNIQUE_LABEL)-[*0..9]-(B)) 
    DETACH DELETE A 
    DETACH DELETE B

Using UNWIND and FOREACH result in error while trying to delete the nodes in the PATH