public function getStudentParentssJoinCountryRelatedByCountryId($criteria = null, $con = null) { include_once 'lib/model/om/BaseStudentParentsPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collStudentParentss === null) { if ($this->isNew()) { $this->collStudentParentss = array(); } else { $criteria->add(StudentParentsPeer::STUDENT_ID, $this->getId()); $this->collStudentParentss = StudentParentsPeer::doSelectJoinCountryRelatedByCountryId($criteria, $con); } } else { $criteria->add(StudentParentsPeer::STUDENT_ID, $this->getId()); if (!isset($this->lastStudentParentsCriteria) || !$this->lastStudentParentsCriteria->equals($criteria)) { $this->collStudentParentss = StudentParentsPeer::doSelectJoinCountryRelatedByCountryId($criteria, $con); } } $this->lastStudentParentsCriteria = $criteria; return $this->collStudentParentss; }