我已经看到了有关在查询上查询关系数据的其他问题,但它们并不能满足我的需求。
我有3个相关的课程:Teacher (1->many) Course (many<-1) Category
鉴于上述结构,我想查询所有课程属于特定类别的教师。以下是我到目前为止的情况:
var Category = Parse.Object.extend("Category");
var category = new Category();
category.id = "shdh43ay";
var Course = Parse.Object.extend("Course"); //There are pointers on Course to both Teacher and Category
var courseQuery = new Parse.Query(Course);
courseQuery.equals('Category', category);
var Teacher = Parse.Object.extend("Teacher");
var teacherQuery = new Parse.Query(Teacher);
teacherQuery.matchesQuery(); //Here is where I am stuck
它不像我看起来像matchQuery会做的伎俩,欢迎任何想法