Repository delete method

Does the Spring repository delete method work like the Cypher detach delete? In other words if I delete an Entity using

myEntityRepository.delete(myEntity);

will that delete all relationships with myEntity?

or do I need to write a @Query MATCH(...) that does the detach delete

Thanks!

The delete(entity) method will create a delete statement that does about the same and looks like MATCH (n) WHERE ID(n) = $id OPTIONAL MATCH (n)-[r0]-() DELETE r0, n.

Excellent! Thanks Gerrit