[SOLVED] How to create a relationship between Auth and my collection?
- 1
- Databases
- Accounts
- Users
- Web
Hey all, i'm currently trying AppWrite out,
https://appwrite.io/docs/tutorials/react/step-6
As I'm flowing the docs and tutorials, i still didn't find how to create a relationship between userId and the Ideas.
I understand to create the field userId, and supply it. but it's without a relationship in the DB, or is it?!
Also on the example , it fetches all of the ideas and not the ideas of the current user.
Currently there is not option to make a relationship between auth (users) and collection.
The approach will be create a collection with all your users, and store all the data you want there, and then in a second collection make a relationship with the "user" collection.
If you activate the document security and assign permission to the owner of the information, you won't need to filter the data, as only will have permission to get the document owned.
To filter a request you can use the Query
class, you can check more information here: https://appwrite.io/docs/products/databases/queries
Thanks!
i'm glad that the solution you offered, was the work around i implemented
[SOLVED] How to create a relationship between Auth and my collection?
Recommended threads
- Deploy function not working - 503
Hellon i get this error message, when i try to deploy a new version of a function <html><body><h1>503 Service Unavailable</h1>No server is available to handle...
- Error When load the website
Hi, I am getting this error whenever I reload my website please help me, I am using react Error: ** GET https://cloud.appwrite.io/v1/account 401 (Unauthoriz...
- Seed db
hello there... is this correct way to seed appwrite