For example, I have Followers collection. I want to add fields with the id of the user who is follower and the id of the user who is followed. ANd I want to use relationship for this to get any info about users when I'll fetch data. So my structure must be like this:
id (string) user_id (relationship to users | one way - many to one) follow_id (relationship to users | one way - many to one)
But problem is I can't use relationship to the same collection. So may be my logic is wrong and I need to do it another way? But I think it would be very convenient and logical to do it this way.
You need to have multiple collections for this case:
- Users (here the name, etc)
- Followers
Inside the followers you have 2 attributes: the ID from the one that follows and another attribute for the ID from the one that is being followed
Recommended threads
- total parameter not working correctly in...
Hello Appwrite team, I'm experiencing issues with the total parameter in the listRows() method (TablesDB) across multiple SDKs. **Issue 1**: Node.js SDK (node...
- Free plan Usage
I using a free plan with one organization. I have three projects but on the free plan I should be able to have 2 projects running But in my case only 1 out of ...
- Database AI Column Suggestion Use Case
I tried using the AI column suggestion feature. For me, I prefer writing my column design separately in a notepad. Then my intention is to paste it into the AI ...