Back

many to many relationship

  • 0
  • Databases
Xecozz
16 Jul, 2024, 15:25

Hello, I have 2 collections (users and exercises) and I would like to have a record collection with 2 relationships (users and exercises) and a value. I've therefore chosen the many to many relationship (since users can have several records and the same goes for exercises), but the problem is that I have to use arrays. How can I avoid using them? Ty

TL;DR
Developers want to establish a many-to-many relationship between users and exercises without using arrays. **Solution:** You can use a junction or pivot table to establish a many-to-many relationship between users and exercises without directly using arrays. This approach allows you to associate users with multiple exercises and vice versa without the need for arrays directly in the user object.
Kenny
16 Jul, 2024, 15:41

It needs to be an array?

One user can have many exercises that would be an array of exercises on the user object

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