public function getVRaports($criteria = null, $con = null) { include_once 'lib/model/om/BaseVRaportPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVRaports === null) { if ($this->isNew()) { $this->collVRaports = array(); } else { $criteria->add(VRaportPeer::SUBJECT_ID, $this->getId()); VRaportPeer::addSelectColumns($criteria); $this->collVRaports = VRaportPeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(VRaportPeer::SUBJECT_ID, $this->getId()); VRaportPeer::addSelectColumns($criteria); if (!isset($this->lastVRaportCriteria) || !$this->lastVRaportCriteria->equals($criteria)) { $this->collVRaports = VRaportPeer::doSelect($criteria, $con); } } } $this->lastVRaportCriteria = $criteria; return $this->collVRaports; }
public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(VRaportPeer::ID, $pks, Criteria::IN); $objs = VRaportPeer::doSelect($criteria, $con); } return $objs; }