themetalfleece / neogma

Object-Graph-Mapping neo4j framework, Fully-typed with TypeScript, for easy and flexible node and relationship operations
https://themetalfleece.github.io/neogma/
MIT License
117 stars 12 forks source link

[Question] Is there a way to delete a node and all its relationships recursively, including the related nodes? #82

Closed pedromtcosta closed 11 months ago

pedromtcosta commented 11 months ago

Does neogma provide a way to delete a node together with all its relationships and related nodes? Or do I have to resort to using Cypher for that?

themetalfleece commented 11 months ago

Hey! I'm afraid you'll have to resort to using Cypher (or via the QueryBuilder) for that. I had started implementing it, but it seemed a bit "dangerous" to have neogma delete all related nodes found via a given condition, and I decided to not go through with it.

pedromtcosta commented 11 months ago

Makes perfect sense to me, just wanted to be sure. Thank you!