예제 #1
0
 public function getEmployeeDetailsJoinEmployee($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseEmployeeDetailPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collEmployeeDetails === null) {
         if ($this->isNew()) {
             $this->collEmployeeDetails = array();
         } else {
             $criteria->add(EmployeeDetailPeer::EMPLOYEE_DIVISION_ID, $this->getId());
             $this->collEmployeeDetails = EmployeeDetailPeer::doSelectJoinEmployee($criteria, $con);
         }
     } else {
         $criteria->add(EmployeeDetailPeer::EMPLOYEE_DIVISION_ID, $this->getId());
         if (!isset($this->lastEmployeeDetailCriteria) || !$this->lastEmployeeDetailCriteria->equals($criteria)) {
             $this->collEmployeeDetails = EmployeeDetailPeer::doSelectJoinEmployee($criteria, $con);
         }
     }
     $this->lastEmployeeDetailCriteria = $criteria;
     return $this->collEmployeeDetails;
 }
예제 #2
0
 public function getEmployeeDetailsRelatedBySpouseReligionIdJoinEmployee($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseEmployeeDetailPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collEmployeeDetailsRelatedBySpouseReligionId === null) {
         if ($this->isNew()) {
             $this->collEmployeeDetailsRelatedBySpouseReligionId = array();
         } else {
             $criteria->add(EmployeeDetailPeer::SPOUSE_RELIGION_ID, $this->getId());
             $this->collEmployeeDetailsRelatedBySpouseReligionId = EmployeeDetailPeer::doSelectJoinEmployee($criteria, $con);
         }
     } else {
         $criteria->add(EmployeeDetailPeer::SPOUSE_RELIGION_ID, $this->getId());
         if (!isset($this->lastEmployeeDetailRelatedBySpouseReligionIdCriteria) || !$this->lastEmployeeDetailRelatedBySpouseReligionIdCriteria->equals($criteria)) {
             $this->collEmployeeDetailsRelatedBySpouseReligionId = EmployeeDetailPeer::doSelectJoinEmployee($criteria, $con);
         }
     }
     $this->lastEmployeeDetailRelatedBySpouseReligionIdCriteria = $criteria;
     return $this->collEmployeeDetailsRelatedBySpouseReligionId;
 }