[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
- Sharing cookies
Hi, I’m using Appwrite Cloud, and I have a setup where my Appwrite backend is hosted on a subdomain (e.g., api.example.com), while my frontend (Next.js app) and...
- Organization not exists anymore
Hello! We have a problem with a cloud database. We are on the Free plan, but after a refresh the site wants me to create a new organisation, and I not see the c...
- JSON and Object Support in Collection do...
I am working with Next.Js and Appwrite Cloud, I am relatively New to Appwrite but i have noticed there is no direct support of JSON and Object support in attrib...
