Skip to content
Back

Relation Question

  • 0
  • Databases
  • Cloud
!
4 Mar, 2026, 17:16

How do I create a relation from table y to an others x.$id.

in my example I have a users table where I use Appwrites unique User IDs and I want other tables for other tasks, where every row needs to belong to one user ID normally those type of relations should be supported simply so I could for example have an inbuilt on cascade, but I couldn't explain myself how to use the database for that

TL;DR
Developers are having trouble creating relationships between tables in the database. They are struggling with the concept of column keys and how to represent related tables effectively. The developer also mentions limitations in using only letters for the column key. The recommended solution is to refer to the documentation provided by Appwrite on creating relationships in databases. Furthermore, the developer expresses confusion about creating a relation from table Y to table X.$id, specifically relating to using Appwrite's unique User IDs. They express a need for every row in other tables to belong to a user ID. The developer is looking for a way to simplify this process, ideally with support for features like
Steven
4 Mar, 2026, 17:23
!
4 Mar, 2026, 17:27

Yes, unfortunately I couldn't figure it out

Steven
4 Mar, 2026, 17:28

What are you confused about?

!
4 Mar, 2026, 17:29

I cant explain how I'd make that work for me

!
4 Mar, 2026, 17:29

because its limited to those only letters

!
4 Mar, 2026, 17:30

I'm not getting the Column key right or something is wrong

Steven
4 Mar, 2026, 17:31

Pick relationship column key(s) to represent the related table. Relationship column keys are used to reference the related table in queries, so pick something that's intuitive and easy to remember.

!
4 Mar, 2026, 17:35

Okay I guess I slowly get an image of how it's working then :appwritepeepo:

Steven
4 Mar, 2026, 17:37

👍🏼 let me know if you're still stuck

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more