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
124 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 1 year ago

pedromtcosta commented 1 year 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 1 year 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 1 year ago

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