What variant of storing liked announcements to choose? Suggest ur own variant too!
- 0
- Android
- Self Hosted
- Users
hi, can you give me some advice about my current project. I have two collections, the first stores all announcements(several attributes(name, price, id...)), the second(own for each person) needs to store liked announcements(with several attributes(name, price, id...)) or only ids of liked announcements. Which variant is better to get list of announcements(with pagination) =>1) bring ids of liked announcements and specify every from the first collection or 2) to to store already liked announcements in the second collection(we will have same attributes in 2 different collections)? Is it significantly longer for user to wait for all requests from server like in 1st variant?
hey, thank you for shifting it here!
I would do a third collection, "liked announcements". It would hold the user id and ad id. I would use pagination. Storing the ids is a good way. In the next versions (https://github.com/appwrite/appwrite/discussions/5179) we will have a type of foreign key, in a single query you can bring all the data
Recommended threads
- [Self-hosted] Realtime crashes with "Mis...
- How to use Operator.arrayAppend on a rel...
Hi, is it possible to use any operator on a relationship column? I have a One to Many relationship column on a table and I would like to add entries to the colu...
- Large File Upload Issue with S3/RustFS
Hi, we are seeing a reproducible large upload failure with Appwrite 1.8.0 using S3-compatible storage through RustFS. A file upload of about 10.7 GB consistent...