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