/** * Filter the query by a related PlayerCourt object * * @param PlayerCourt|PropelObjectCollection $playerCourt the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return PlayerQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByPlayerCourt($playerCourt, $comparison = null) { if ($playerCourt instanceof PlayerCourt) { return $this->addUsingAlias(PlayerPeer::ID, $playerCourt->getPlayerId(), $comparison); } elseif ($playerCourt instanceof PropelObjectCollection) { return $this->usePlayerCourtQuery()->filterByPrimaryKeys($playerCourt->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByPlayerCourt() only accepts arguments of type PlayerCourt or PropelCollection'); } }