Esempio n. 1
0
 public function getCounselingsJoinClassGroup($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseCounselingPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collCounselings === null) {
         if ($this->isNew()) {
             $this->collCounselings = array();
         } else {
             $criteria->add(CounselingPeer::EMPLOYEE_ID, $this->getId());
             $this->collCounselings = CounselingPeer::doSelectJoinClassGroup($criteria, $con);
         }
     } else {
         $criteria->add(CounselingPeer::EMPLOYEE_ID, $this->getId());
         if (!isset($this->lastCounselingCriteria) || !$this->lastCounselingCriteria->equals($criteria)) {
             $this->collCounselings = CounselingPeer::doSelectJoinClassGroup($criteria, $con);
         }
     }
     $this->lastCounselingCriteria = $criteria;
     return $this->collCounselings;
 }