Back

More than one relationship with the same collection?

  • 0
  • Databases
  • Web
  • Cloud
-N I N J A-
2 Jan, 2024, 07:50

I am implementing followers and following system for my rn app, but unable to have relationship with same collection 2 times Eg.

  1. follower_id
  2. following_id

Both attributes should have relationship with users collection, How is it possible??

TL;DR
The user wants to know if Appwrite supports complex queries like join and subqueries. They specifically want to have multiple relationships with the same collection. There is no solution provided in this support thread.
Guille
2 Jan, 2024, 12:00

I have no problem creating more than one relationship in the same collection, are getting some error? can you share the attributes of the 3 collections?

-N I N J A-
2 Jan, 2024, 13:16

I also don't have problem creating relationship more than one with different collections

I want multiple relationship with same collection

ideclon
2 Jan, 2024, 13:19

Is the Relationship one-to-many? Many-to-one? Etc

-N I N J A-
2 Jan, 2024, 13:20

Many to many

-N I N J A-
2 Jan, 2024, 13:25

Let me explain: I have two attributes

  1. follower_id
  2. following_id

I want to get both follower and following user data when I fetch document from followers collection, that's why I need relationship in both attributes with same collection

ideclon
2 Jan, 2024, 13:34

Yeah. I don’t think that’s possible at the moment.

-N I N J A-
2 Jan, 2024, 14:20

When will appwrite support complex queries like Join, subqueries... Etc

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