
I want my User record to track a list of favorites. From my research I think I've found two viable solutions :
- Attach a relationship of the favorited item to the user.
- Have an array of Strings that holds all favorited items IDs, that I can parse later.
Note : The favorited items are all the same type, and therefore from the same collection.
Which would be the proper/best way to handle this?
- and - What are the pros and cons of both methods?
TL;DR
Developers want to track a list of favorites for user records. The two viable solutions are: 1. attach a relationship of the favorited item to the user or 2. have an array of strings storing favorited item IDs.
Pros and cons:
1. Attaching relationship: Pros - easier to query, maintain referential integrity. Cons - can be more complex, potentially slower.
2. Array of Strings: Pros - simpler setup, quicker access to all favorites. Cons - parsing may be required, can be less efficient for large datasets.
Solution: Consider using solution 1 for scalability and better performance, unless dealing withRecommended threads
- Realtime Disconnects and Error: INVALID_...
Hi Support, we are still experiencing the issue and we are a subscriber on your platform under the account of charlesbcalague@gmail.com I just want to ask here...
- Collection Permission issue
I am facing issue in my Pro account. "Add" button is disabled while adding permission in DB collection settings.
- Origin error after changing default port...
Hi! I need some help regarding an issue I’m facing with Appwrite after changing the default ports. I have a self-hosted Appwrite instance running on my VPS. I ...
