コード例 #1
0
ファイル: BaseJob.php プロジェクト: taryono/school
 public function getJobsRelatedByParentJoinJobTemplate($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseJobPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collJobsRelatedByParent === null) {
         if ($this->isNew()) {
             $this->collJobsRelatedByParent = array();
         } else {
             $criteria->add(JobPeer::PARENT, $this->getId());
             $this->collJobsRelatedByParent = JobPeer::doSelectJoinJobTemplate($criteria, $con);
         }
     } else {
         $criteria->add(JobPeer::PARENT, $this->getId());
         if (!isset($this->lastJobRelatedByParentCriteria) || !$this->lastJobRelatedByParentCriteria->equals($criteria)) {
             $this->collJobsRelatedByParent = JobPeer::doSelectJoinJobTemplate($criteria, $con);
         }
     }
     $this->lastJobRelatedByParentCriteria = $criteria;
     return $this->collJobsRelatedByParent;
 }