예제 #1
0
 /**
  * Declares an association between this object and a ChildGame object.
  *
  * @param  ChildGame $v
  * @return $this|\ApostaAiApi\Models\Participant 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->addParticipant($this);
     }
     return $this;
 }
 /**
  * Filter the query by a related \ApostaAiApi\Models\Game object
  *
  * @param \ApostaAiApi\Models\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 ChildParticipantQuery The current query, for fluid interface
  */
 public function filterByGame($game, $comparison = null)
 {
     if ($game instanceof \ApostaAiApi\Models\Game) {
         return $this->addUsingAlias(ParticipantTableMap::COL_GAME_ID, $game->getId(), $comparison);
     } elseif ($game instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ParticipantTableMap::COL_GAME_ID, $game->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByGame() only accepts arguments of type \\ApostaAiApi\\Models\\Game or Collection');
     }
 }
예제 #3
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;
 }