Exemplo n.º 1
0
 /**
  * Filter the query by a related \Games object
  *
  * @param \Games|ObjectCollection $games 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 ChildUserReviewsQuery The current query, for fluid interface
  */
 public function filterByGames($games, $comparison = null)
 {
     if ($games instanceof \Games) {
         return $this->addUsingAlias(UserReviewsTableMap::COL_GAME_ID, $games->getId(), $comparison);
     } elseif ($games instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(UserReviewsTableMap::COL_GAME_ID, $games->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByGames() only accepts arguments of type \\Games or Collection');
     }
 }