/**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aGame) {
         $this->aGame->removeParticipant($this);
     }
     $this->id = null;
     $this->name = null;
     $this->country_code = null;
     $this->is_winner = null;
     $this->game_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
 /**
  * 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');
     }
 }
Example #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;
 }