Here is a suggestion: Don't make a separate token collection. Instead use a token object array within the User document and manage the token array with array functions. The overhead for tokens doesn't add any benefits.
On Tuesday, July 13, 2021 at 10:09:03 AM UTC+2 do point wrote: > (hypothetical example) > > Say I have a users document group and another document > group sessionTokens that store the session the users have. Each user can > have multiple tokens but a token can only belong to one user. The > association is done through edges. > > Now if I use graph functions I can delete a token and the edge between the > user and the token gets deleted automatically, and that is great. But what > if I want to make sure that if a user is deleted, I want all their session > tokens (vertices) to be deleted automatically as well (or else they will be > orphan tokens)? Do I have to handle this in application code? Or is there a > declarative way to ensure this type of integrity? > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/arangodb/3ea7db74-ab3f-45bd-8ba1-5efd8f630a0fn%40googlegroups.com.