So i have this database with collections user > topic > notes. Each user can have multiple topics and each topic can contain many notes. if I get user document with no queries, it fetches all of his topics and notes which I think might be slow if he has many notes. I've tried to use select query like so Query.select(['topic.*']). It doesn't return notes but also doesn't return $id of the topic document so I could get notes related to that topic. what would be the best practice here?
Queries with relationships aren't supported atm.
maybe you could add userId attribute to the topic collection and use it as a reference via the user id.
Recommended threads
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...