Back

Please help me set up Relationship

  • 0
  • Databases
  • Web
Andrii Lytvynov
24 Jan, 2024, 01:32

I'm a beginner, I made an application in React following the guides. The structure of my application is below. I have collections: 'Users', 'Posts', 'Saved Posts'. Between them I managed to set up a Relationship. I now want to create a 'Followers' collection so that my 'User' contains an array of subscriptions (id of the users I followed). How to correctly establish connections between the 'Users' and 'Followers' collections, what are the correct attributes to set?

TL;DR
Subject: Setting up Relationship between the 'Users' and 'Followers' collections Message: As a beginner React developer, you have successfully set up a Relationship between the 'Users', 'Posts', and 'Saved Posts' collections in your application. Now, you want to create a 'Followers' collection where each 'User' contains an array of subscriptions (IDs of the users they follow). To establish connections between the 'Users' and 'Followers' collections, you need to properly set the attributes. Here's a step-by-step guide: 1. In your 'Followers' collection, create a field named 'follower
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