Esempio n. 1
0
 public static function retrieveByPK($etime_id, $rsvp_id, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $criteria = new Criteria();
     $criteria->add(EtimeRsvpPeer::ETIME_ID, $etime_id);
     $criteria->add(EtimeRsvpPeer::RSVP_ID, $rsvp_id);
     $v = EtimeRsvpPeer::doSelect($criteria, $con);
     return !empty($v) ? $v[0] : null;
 }
Esempio n. 2
0
 public function getEtimeRsvps($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseEtimeRsvpPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collEtimeRsvps === null) {
         if ($this->isNew()) {
             $this->collEtimeRsvps = array();
         } else {
             $criteria->add(EtimeRsvpPeer::ETIME_ID, $this->getId());
             EtimeRsvpPeer::addSelectColumns($criteria);
             $this->collEtimeRsvps = EtimeRsvpPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(EtimeRsvpPeer::ETIME_ID, $this->getId());
             EtimeRsvpPeer::addSelectColumns($criteria);
             if (!isset($this->lastEtimeRsvpCriteria) || !$this->lastEtimeRsvpCriteria->equals($criteria)) {
                 $this->collEtimeRsvps = EtimeRsvpPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastEtimeRsvpCriteria = $criteria;
     return $this->collEtimeRsvps;
 }