0
votes

I have a question to the graph definition in arangodb. It is a very simple scenario, but i could not find a good solution. I create a graph with vertex collections A,B,C,D. I create an edge collection E. In edge definition I define (E, [A,B], [C,D]). Now i just want to delete vertex collection D. The only way I found is to use _graps collection to find out which vertex collections are connected with E edge and to rebuild the edge definition without D. Only then D will be moved to orphand collections and can be removed with _removeVertexCollection. Looks really dirty.

Thank you, Andrey

1

1 Answers

0
votes

It is true that deleting a whole vertex can be a bit annoying using the graph objects due to the checks and balances it uses to enforce that we do not with broken and orphan relationships/vertices. However, since this a multi-model DB, you are not required to use the graph object. Indeed, you could just delete any data from the DB using straight forward delete AQL statements aimed directly to the collection. At that point, of course, it becomes the application responsibility to delete all the related information as needed.