Exemplo n.º 1
0
 public function getStudentParentssRelatedByRegionIdJoinStudent($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->collStudentParentssRelatedByRegionId === null) {
         if ($this->isNew()) {
             $this->collStudentParentssRelatedByRegionId = array();
         } else {
             $criteria->add(StudentParentsPeer::REGION_ID, $this->getId());
             $this->collStudentParentssRelatedByRegionId = StudentParentsPeer::doSelectJoinStudent($criteria, $con);
         }
     } else {
         $criteria->add(StudentParentsPeer::REGION_ID, $this->getId());
         if (!isset($this->lastStudentParentsRelatedByRegionIdCriteria) || !$this->lastStudentParentsRelatedByRegionIdCriteria->equals($criteria)) {
             $this->collStudentParentssRelatedByRegionId = StudentParentsPeer::doSelectJoinStudent($criteria, $con);
         }
     }
     $this->lastStudentParentsRelatedByRegionIdCriteria = $criteria;
     return $this->collStudentParentssRelatedByRegionId;
 }