Exemple #1
0
 public function getEtimeTags($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseEtimeTagPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collEtimeTags === null) {
         if ($this->isNew()) {
             $this->collEtimeTags = array();
         } else {
             $criteria->add(EtimeTagPeer::ETIME_ID, $this->getId());
             EtimeTagPeer::addSelectColumns($criteria);
             $this->collEtimeTags = EtimeTagPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(EtimeTagPeer::ETIME_ID, $this->getId());
             EtimeTagPeer::addSelectColumns($criteria);
             if (!isset($this->lastEtimeTagCriteria) || !$this->lastEtimeTagCriteria->equals($criteria)) {
                 $this->collEtimeTags = EtimeTagPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastEtimeTagCriteria = $criteria;
     return $this->collEtimeTags;
 }