public function getVStudentScores($criteria = null, $con = null) { include_once 'lib/model/om/BaseVStudentScorePeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVStudentScores === null) { if ($this->isNew()) { $this->collVStudentScores = array(); } else { $criteria->add(VStudentScorePeer::GRADE_SPEC_ID, $this->getId()); VStudentScorePeer::addSelectColumns($criteria); $this->collVStudentScores = VStudentScorePeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(VStudentScorePeer::GRADE_SPEC_ID, $this->getId()); VStudentScorePeer::addSelectColumns($criteria); if (!isset($this->lastVStudentScoreCriteria) || !$this->lastVStudentScoreCriteria->equals($criteria)) { $this->collVStudentScores = VStudentScorePeer::doSelect($criteria, $con); } } } $this->lastVStudentScoreCriteria = $criteria; return $this->collVStudentScores; }
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(VStudentScorePeer::ID, $pks, Criteria::IN); $objs = VStudentScorePeer::doSelect($criteria, $con); } return $objs; }