Exemplo n.º 1
0
 public static function retrieveByPK($test_schedule_id, $location_id, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $criteria = new Criteria();
     $criteria->add(VTestApplSched2Peer::TEST_SCHEDULE_ID, $test_schedule_id);
     $criteria->add(VTestApplSched2Peer::LOCATION_ID, $location_id);
     $v = VTestApplSched2Peer::doSelect($criteria, $con);
     return !empty($v) ? $v[0] : null;
 }
Exemplo n.º 2
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = VTestApplSched2Peer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setTestScheduleId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setLocationId($arr[$keys[1]]);
     }
 }
Exemplo n.º 3
0
 public function getVTestApplSched2sJoinTestSchedule($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseVTestApplSched2Peer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collVTestApplSched2s === null) {
         if ($this->isNew()) {
             $this->collVTestApplSched2s = array();
         } else {
             $criteria->add(VTestApplSched2Peer::LOCATION_ID, $this->getId());
             $this->collVTestApplSched2s = VTestApplSched2Peer::doSelectJoinTestSchedule($criteria, $con);
         }
     } else {
         $criteria->add(VTestApplSched2Peer::LOCATION_ID, $this->getId());
         if (!isset($this->lastVTestApplSched2Criteria) || !$this->lastVTestApplSched2Criteria->equals($criteria)) {
             $this->collVTestApplSched2s = VTestApplSched2Peer::doSelectJoinTestSchedule($criteria, $con);
         }
     }
     $this->lastVTestApplSched2Criteria = $criteria;
     return $this->collVTestApplSched2s;
 }