im trying to make a query like the one blow, but since i can't test it, i would like to know your opinion about if it would work:
"PencilCase" is a table that contains different pencils: "objectId" - "name" - "createdAt" - ....
"Students" is a table that contains students and specifically a column of a relation of "PencilCase" objects in it.
So if i query for students i wouldn't get the pencilCase objects by default because its a relation, i would have to query for it after.
Now that i have explained it, i want to query for "Students" but i want to limit it by its "PencilCase", so i want to know if the query below would get the job done:
var Class = Parse.Object.extend("PencilCase");
var innerQuery = new Parse.Query(Class);
innerQuery.containsAll("objectId", arrayOfDesiredPensilCases);
var Class = Parse.Object.extend("Students");
var query = new Parse.Query(Class);
query.matchesQuery("pencils", innerQuery);
query.find({
success: function(students) {
//
}
});
Thanks, Newton