public function addSubjectColumnCriteria(Criteria $criteria, $field, $value) { $current_career_subject_school_year_ids = CareerSubjectSchoolYearPeer::getCurrentCareerSubjectSchoolYearIdsBySubjectId($value); $criteria->add(CourseSubjectPeer::CAREER_SUBJECT_SCHOOL_YEAR_ID, $current_career_subject_school_year_ids, Criteria::IN); $criteria->addJoin(CourseSubjectTeacherPeer::COURSE_SUBJECT_ID, CourseSubjectPeer::ID); $criteria->addJoin(TeacherPeer::ID, CourseSubjectTeacherPeer::TEACHER_ID); }