Ejemplo n.º 1
0
 /**
  * Filter the query by a related \Haus23\Dtp\Model\Player object
  *
  * @param \Haus23\Dtp\Model\Player|ObjectCollection $player 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 ChildTipQuery The current query, for fluid interface
  */
 public function filterByPlayer($player, $comparison = null)
 {
     if ($player instanceof \Haus23\Dtp\Model\Player) {
         return $this->addUsingAlias(TipTableMap::COL_PLAYER_ID, $player->getId(), $comparison);
     } elseif ($player instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TipTableMap::COL_PLAYER_ID, $player->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByPlayer() only accepts arguments of type \\Haus23\\Dtp\\Model\\Player or Collection');
     }
 }