/** * Exclude object from result * * @param ChildLeagueRef $leagueRef Object to remove from the list of results * * @return $this|ChildLeagueRefQuery The current query, for fluid interface */ public function prune($leagueRef = null) { if ($leagueRef) { $this->addUsingAlias(LeagueRefTableMap::COL_LEAGUE, $leagueRef->getLeague(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \LeagueRef object * * @param \LeagueRef|ObjectCollection $leagueRef 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 ChildTeamsQuery The current query, for fluid interface */ public function filterByLeagueRef($leagueRef, $comparison = null) { if ($leagueRef instanceof \LeagueRef) { return $this->addUsingAlias(TeamsTableMap::COL_LEAGUE, $leagueRef->getLeague(), $comparison); } elseif ($leagueRef instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(TeamsTableMap::COL_LEAGUE, $leagueRef->toKeyValue('PrimaryKey', 'League'), $comparison); } else { throw new PropelException('filterByLeagueRef() only accepts arguments of type \\LeagueRef or Collection'); } }
/** * Declares an association between this object and a ChildLeagueRef object. * * @param ChildLeagueRef $v * @return $this|\Teams The current object (for fluent API support) * @throws PropelException */ public function setLeagueRef(ChildLeagueRef $v = null) { if ($v === null) { $this->setLeague(''); } else { $this->setLeague($v->getLeague()); } $this->aLeagueRef = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildLeagueRef object, it will not be re-added. if ($v !== null) { $v->addTeams($this); } return $this; }