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
- TablesDB `updateRows` returns `database_...
Hi Appwrite team! Iโm seeing a strange issue with TablesDB bulk row updates on a self-hosted Appwrite instance. **Environment** - Appwrite self-hosted `1.9.0` ...
- Update row sheet not loading
After right clicking a row header and click update, the sidebar fails to load (never-ending skeleton)
- DB Relational Table Request
Hi, I'd like to suggest a rewording of the relationships between tables. - Current wording: storeOperatingDays can contain one storeId ...