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
- Relationship data Not showing on update ...
Version : 1.9.0 OS/System : Windows10/Docker Database : MongoDB Clean Zero Installation The first thing I did in the testing process was create a category and...
- I lost my account, only thing i have is ...
So i had this project on appwrite for my web project called Islami zindagi, but i havent used it in a while, now i tried to login, but i could not remember the ...
- 403 The current user has been blocked.
Hello, I have a free plan; I've tried to access my project and I get the message "403 The current user has been blocked." I have database, sites, and auth in us...