I have these three collections namely users, schools, and assignment. The assignment collection has a relationship to school and user mainly one to many (one school/user, many assignment) relationships. How do I query all schools that have been assigned to that assignment?
Queries on relationships are not supported at the moment
ohh okay, I guess I'll just fetch all data from the db then filter it out my code. thank you
A workaround could be to include the school ID in the assignments collection and then query against that
I already have that, the assignments collection contain attributes of user and schools but how can I get all the schools that is assigned to an assignment?
for example I have this 9 assignments with different school ID and linked to a user how can I query that?
finding the assignments that assigned on the user can be using Query.equal("user", [user_id]). but how do I only get all schools that has been assigned to the user in the assignment collection?\
that query should give you all assignments where user == user_id...and so each of those assignments has a school. so what part are you stuck on?
Recommended threads
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...
- Courtesy limit reset for non-profit migr...
Hi Team! I'm the architect for a 501(c)(3) non-profit project (Aaria's Blue Elephant) and we just hit our Free plan Database Read limit (currently at 164%). Th...
- Does 1.9.0 Self Hosted have MongoDB Atla...
I have been playing with the new 1.9.0 update and I am really excited for the MongoDB support. I wanted to ask though if at the current time Appwrite supports b...