コード例 #1
0
ファイル: PerformanceScoreQuery.php プロジェクト: iuf/junia
 /**
  * Filter the query by a related \iuf\junia\model\Judge object
  *
  * @param \iuf\junia\model\Judge|ObjectCollection $judge The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildPerformanceScoreQuery The current query, for fluid interface
  */
 public function filterByJudge($judge, $comparison = null)
 {
     if ($judge instanceof \iuf\junia\model\Judge) {
         return $this->addUsingAlias(PerformanceScoreTableMap::COL_JUDGE_ID, $judge->getId(), $comparison);
     } elseif ($judge instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PerformanceScoreTableMap::COL_JUDGE_ID, $judge->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByJudge() only accepts arguments of type \\iuf\\junia\\model\\Judge or Collection');
     }
 }