[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
- Google login error: {"message":"Invalid ...
hi, im trying to use google login with account.createOAuth2Session( 'google', 'profevardilla.pages.dev', 'profevardilla.pages.dev'...
- Auth Error
"use client"; import { useEffect } from "react"; import { getSessionCookie } from "@/actions/auth"; import { createBrowserSessionClient } from "@/lib/appwrite-...
- Prevent modifying specific attributes
How do I prevent user to only to be able to modify some of the attributes. Document level security gives full access to update whole document, what are the wor...
