
In the docs, there is a reference, that you can link users to documents in a relationship. But how can I do this? I don't see an option to create such a relationship in both user and document-collection.
I need to make sure, that documents will be deleted, if their creator-users will be deleted sometimes.

Where do you read that ?

Hey I am not sure but maybe you an use the relationships feature to establish a relationship between your collection and the users collection where you can set "cascade" to true. You can read more here: https://appwrite.io/docs/databases-relationships

Hope it helps 🙂

Relationship don't works with Auth users

ohh very usefull

We cant link user to a specific document in a collection ? Like I have a collection for extra user data like "username", "bio", etc... its cant super usefull to link each document to user because right now I have to add in each document the userId

You can't with real relation. Common case is to set documentId = userId and set permission

yeah this is what I did

Exactly ths document irritated me. Does this mean, that I have to create a users collection besides of the Auth collection?
Recommended threads
- Invalid relationship value. Must be eith...
I'm getting this error when i try to update a document. The collection has a relatipship with 2 other collections. I don't understand why, when i update the doc...
- How do I do this. Please help!
Hey guys! Okay AI can't help so I'm asking real people now. 😓 Anyway I wanted to know how one solve this in Appwrite right now. So I have a form where I wante...
- Delete account on authentication
I'm building an authentication that need to a user a choice of delete their account when they need and on the documentation, if I find delete sessions or sessio...
