如您所见School
,我有两个班级。Student
我想搜索“学校名称为 bla bla bla 的学生”和“拥有 90 年级以上学生的学校”。我阅读了一些文件,但我有点困惑。
public class School extends BasicDBObject {
private int id;
private String name;
private String number;
private List<Student> studentList = new ArrayList<Student>();,
//getter and setters
}
public class Student extends BasicDBObject{
private int id;
private String name;
private String grade;
private School school;
//getter and setters
}