Back with another arango question.
Is there a simple way to remove a document and all of its edges? Is this solution recursive?
Again lets say I have something like the below.
- Circle are stored in a document collection.
- Square are stored in a document collection.
Then I have two Edge Collections HAS_CIRCLE and HAS_SQUARE which correspond appropriately to the various \
indicated.
Circle A
/ \
Square 1 Circle B
/ \ \
Circle C Square 2 Square 3
/
Square 4
If I want to delete Circle B. Then I also wanted to delete Circle C, Square 2, Square 3, and Square 4. Along with all the edges.
So basically I would end up with.
Circle A
/
Square 1
Right now my approach is to get all the keys for Circle C's edges and associated documents. Then I do this recursively with javascript. I'm using the arangojs module and using the removeByKeys
once I have what I need.
Unsure if there was some magic I'm missing.