Exemplo n.º 1
0
 public function getVAppPayments($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseVAppPaymentPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collVAppPayments === null) {
         if ($this->isNew()) {
             $this->collVAppPayments = array();
         } else {
             $criteria->add(VAppPaymentPeer::ACADEMIC_COST_ID, $this->getId());
             VAppPaymentPeer::addSelectColumns($criteria);
             $this->collVAppPayments = VAppPaymentPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(VAppPaymentPeer::ACADEMIC_COST_ID, $this->getId());
             VAppPaymentPeer::addSelectColumns($criteria);
             if (!isset($this->lastVAppPaymentCriteria) || !$this->lastVAppPaymentCriteria->equals($criteria)) {
                 $this->collVAppPayments = VAppPaymentPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastVAppPaymentCriteria = $criteria;
     return $this->collVAppPayments;
 }