Ejemplo n.º 1
0
 public function getVInfaqs($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseVInfaqPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collVInfaqs === null) {
         if ($this->isNew()) {
             $this->collVInfaqs = array();
         } else {
             $criteria->add(VInfaqPeer::ACADEMIC_COST_ID, $this->getId());
             VInfaqPeer::addSelectColumns($criteria);
             $this->collVInfaqs = VInfaqPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(VInfaqPeer::ACADEMIC_COST_ID, $this->getId());
             VInfaqPeer::addSelectColumns($criteria);
             if (!isset($this->lastVInfaqCriteria) || !$this->lastVInfaqCriteria->equals($criteria)) {
                 $this->collVInfaqs = VInfaqPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastVInfaqCriteria = $criteria;
     return $this->collVInfaqs;
 }
Ejemplo n.º 2
0
 public static function doSelectOne(Criteria $criteria, $con = null)
 {
     $critcopy = clone $criteria;
     $critcopy->setLimit(1);
     $objects = VInfaqPeer::doSelect($critcopy, $con);
     if ($objects) {
         return $objects[0];
     }
     return null;
 }