Course course2 = newCourse("Not Biology");
Course course3 = newCourse("Biology");
Course course4 = newCourse("Not Biology");
Course course5 = newCourse("Biology");
Course course6 = newCourse("Not Biology");
Student student = newStudent(10, course1, course2);
makePersistentInTxn(student, TXN_START_END);
Student student2 = newStudent(11, course3, course4);
makePersistentInTxn(student2, TXN_START_END);
Student student3 = newStudent(10, course5, course6);
makePersistentInTxn(student3, TXN_START_END);
beginTxn();
Query q = pm.newQuery(
"select from " + Student.class.getName() + " where "
+ "courses.contains(c) && c.department == 'Biology' && "