예제 #1
0
 /**
  * Filter the query by a related \iuf\junia\model\Score object
  *
  * @param \iuf\junia\model\Score|ObjectCollection $score 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 filterByScore($score, $comparison = null)
 {
     if ($score instanceof \iuf\junia\model\Score) {
         return $this->addUsingAlias(PerformanceScoreTableMap::COL_ID, $score->getId(), $comparison);
     } elseif ($score instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PerformanceScoreTableMap::COL_ID, $score->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByScore() only accepts arguments of type \\iuf\\junia\\model\\Score or Collection');
     }
 }