/** * Filter the query by a related \Haus23\Dtp\Model\Championship object * * @param \Haus23\Dtp\Model\Championship|ObjectCollection $championship 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 ChildPlayerQuery The current query, for fluid interface */ public function filterByChampionship($championship, $comparison = null) { if ($championship instanceof \Haus23\Dtp\Model\Championship) { return $this->addUsingAlias(PlayerTableMap::COL_CHAMPIONSHIP_ID, $championship->getId(), $comparison); } elseif ($championship instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(PlayerTableMap::COL_CHAMPIONSHIP_ID, $championship->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByChampionship() only accepts arguments of type \\Haus23\\Dtp\\Model\\Championship or Collection'); } }
/** * Declares an association between this object and a ChildChampionship object. * * @param ChildChampionship $v * @return $this|\Haus23\Dtp\Model\Match The current object (for fluent API support) * @throws PropelException */ public function setChampionship(ChildChampionship $v = null) { if ($v === null) { $this->setChampionshipId(NULL); } else { $this->setChampionshipId($v->getId()); } $this->aChampionship = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildChampionship object, it will not be re-added. if ($v !== null) { $v->addMatch($this); } return $this; }
/** * Exclude object from result * * @param ChildChampionship $championship Object to remove from the list of results * * @return $this|ChildChampionshipQuery The current query, for fluid interface */ public function prune($championship = null) { if ($championship) { $this->addUsingAlias(ChampionshipTableMap::COL_ID, $championship->getId(), Criteria::NOT_EQUAL); } return $this; }