/**
  * 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');
     }
 }
Exemple #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildGame $game Object to remove from the list of results
  *
  * @return $this|ChildGameQuery The current query, for fluid interface
  */
 public function prune($game = null)
 {
     if ($game) {
         $this->addUsingAlias(GameTableMap::COL_ID, $game->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Exemple #3
0
 /**
  * Declares an association between this object and a ChildGame object.
  *
  * @param  ChildGame $v
  * @return $this|\RatingHeader The current object (for fluent API support)
  * @throws PropelException
  */
 public function setGame(ChildGame $v = null)
 {
     if ($v === null) {
         $this->setGameId(NULL);
     } else {
         $this->setGameId($v->getId());
     }
     $this->aGame = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildGame object, it will not be re-added.
     if ($v !== null) {
         $v->addRatingHeader($this);
     }
     return $this;
 }