コード例 #1
0
 /**
  * Exclude object from result
  *
  * @param   ChildParticipant $participant Object to remove from the list of results
  *
  * @return $this|ChildParticipantQuery The current query, for fluid interface
  */
 public function prune($participant = null)
 {
     if ($participant) {
         $this->addUsingAlias(ParticipantTableMap::COL_ID, $participant->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #2
0
 /**
  * Filter the query by a related \ApostaAiApi\Models\Participant object
  *
  * @param \ApostaAiApi\Models\Participant|ObjectCollection $participant 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 ChildBetQuery The current query, for fluid interface
  */
 public function filterByParticipant($participant, $comparison = null)
 {
     if ($participant instanceof \ApostaAiApi\Models\Participant) {
         return $this->addUsingAlias(BetTableMap::COL_CHOSEN_PARTICIPANT_ID, $participant->getId(), $comparison);
     } elseif ($participant instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(BetTableMap::COL_CHOSEN_PARTICIPANT_ID, $participant->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByParticipant() only accepts arguments of type \\ApostaAiApi\\Models\\Participant or Collection');
     }
 }
コード例 #3
0
ファイル: Bet.php プロジェクト: amandaaurita/hackapuc2015
 /**
  * Declares an association between this object and a ChildParticipant object.
  *
  * @param  ChildParticipant $v
  * @return $this|\ApostaAiApi\Models\Bet The current object (for fluent API support)
  * @throws PropelException
  */
 public function setParticipant(ChildParticipant $v = null)
 {
     if ($v === null) {
         $this->setChosenParticipantId(NULL);
     } else {
         $this->setChosenParticipantId($v->getId());
     }
     $this->aParticipant = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildParticipant object, it will not be re-added.
     if ($v !== null) {
         $v->addBet($this);
     }
     return $this;
 }