public static function retrieveByCareerSubjectSchoolYearAndStudent(CareerSubjectSchoolYear $career_subject_school_year, $student_id) { $c = new Criteria(); $c->add(self::STUDENT_ID, $student_id); $c->addJoin(self::COURSE_SUBJECT_ID, CourseSubjectPeer::ID, Criteria::INNER_JOIN); $c->add(CourseSubjectPeer::CAREER_SUBJECT_SCHOOL_YEAR_ID, $career_subject_school_year->getId()); return self::doSelectOne($c); }
public function getCourseSubjectForCareerSubjectSchoolYear(CareerSubjectSchoolYear $cssy) { $c = new Criteria(); $c->addJoin(CoursePeer::ID, CourseSubjectPeer::COURSE_ID, Criteria::INNER_JOIN); $c->add(CourseSubjectPeer::CAREER_SUBJECT_SCHOOL_YEAR_ID, $cssy->getId()); $c->add(CoursePeer::DIVISION_ID, $this->getId()); return CourseSubjectPeer::doSelectOne($c); }