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
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- Appwrite exception: user_unauthorized, t...
After refreshing the app it is working perfectly