Exemple #1
0
 public function getColLocationsRelatedByParentJoinDepartment($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseColLocationPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collColLocationsRelatedByParent === null) {
         if ($this->isNew()) {
             $this->collColLocationsRelatedByParent = array();
         } else {
             $criteria->add(ColLocationPeer::PARENT, $this->getId());
             $this->collColLocationsRelatedByParent = ColLocationPeer::doSelectJoinDepartment($criteria, $con);
         }
     } else {
         $criteria->add(ColLocationPeer::PARENT, $this->getId());
         if (!isset($this->lastColLocationRelatedByParentCriteria) || !$this->lastColLocationRelatedByParentCriteria->equals($criteria)) {
             $this->collColLocationsRelatedByParent = ColLocationPeer::doSelectJoinDepartment($criteria, $con);
         }
     }
     $this->lastColLocationRelatedByParentCriteria = $criteria;
     return $this->collColLocationsRelatedByParent;
 }