예제 #1
0
파일: JudgeQuery.php 프로젝트: iuf/junia
 /**
  * Filter the query by a related \iuf\junia\model\Score object
  *
  * @param \iuf\junia\model\Score|ObjectCollection $score the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildJudgeQuery The current query, for fluid interface
  */
 public function filterByScore($score, $comparison = null)
 {
     if ($score instanceof \iuf\junia\model\Score) {
         return $this->addUsingAlias(JudgeTableMap::COL_ID, $score->getJudgeId(), $comparison);
     } elseif ($score instanceof ObjectCollection) {
         return $this->useScoreQuery()->filterByPrimaryKeys($score->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByScore() only accepts arguments of type \\iuf\\junia\\model\\Score or Collection');
     }
 }