
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
- Issue with `listDocuments` when using qu...
Hello, Appwrite team! I'm having an issue with `listDocuments` when using query modifiers: **Environment:** - Self-hosted Appwrite (`Version 1.4.13`) installe...
- Function gives unauthorized error when w...
I am on free tier. I have function that has three attributes: 1. A stand alone attribute (required) 2. A many to one relationship attribute 3. A many to man...
- The UI for creating relational data is d...
It is difficult to select data from other collections when creationg relational data. The dropdown menu is sometimes unresponsive. Sometimes the delete button d...
