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(VTestApplSched1Peer::TEST_SCHEDULE_ID, $test_schedule_id); $criteria->add(VTestApplSched1Peer::LOCATION_ID, $location_id); $v = VTestApplSched1Peer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }
public function getVTestApplSched1s($criteria = null, $con = null) { include_once 'lib/model/om/BaseVTestApplSched1Peer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVTestApplSched1s === null) { if ($this->isNew()) { $this->collVTestApplSched1s = array(); } else { $criteria->add(VTestApplSched1Peer::LOCATION_ID, $this->getId()); VTestApplSched1Peer::addSelectColumns($criteria); $this->collVTestApplSched1s = VTestApplSched1Peer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(VTestApplSched1Peer::LOCATION_ID, $this->getId()); VTestApplSched1Peer::addSelectColumns($criteria); if (!isset($this->lastVTestApplSched1Criteria) || !$this->lastVTestApplSched1Criteria->equals($criteria)) { $this->collVTestApplSched1s = VTestApplSched1Peer::doSelect($criteria, $con); } } } $this->lastVTestApplSched1Criteria = $criteria; return $this->collVTestApplSched1s; }