/** * Filter the query by a related \Teams object * * @param \Teams|ObjectCollection $teams the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildDivisionRefQuery The current query, for fluid interface */ public function filterByTeams($teams, $comparison = null) { if ($teams instanceof \Teams) { return $this->addUsingAlias(DivisionRefTableMap::COL_DIVISION, $teams->getDivision(), $comparison); } elseif ($teams instanceof ObjectCollection) { return $this->useTeamsQuery()->filterByPrimaryKeys($teams->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByTeams() only accepts arguments of type \\Teams or Collection'); } }
/** * Exclude object from result * * @param ChildTeams $teams Object to remove from the list of results * * @return $this|ChildTeamsQuery The current query, for fluid interface */ public function prune($teams = null) { if ($teams) { $this->addUsingAlias(TeamsTableMap::COL_ID, $teams->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \Teams object * * @param \Teams|ObjectCollection $teams 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 ChildPlayersQuery The current query, for fluid interface */ public function filterByTeams($teams, $comparison = null) { if ($teams instanceof \Teams) { return $this->addUsingAlias(PlayersTableMap::COL_MWBL, $teams->getTeamAbbrev(), $comparison); } elseif ($teams instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(PlayersTableMap::COL_MWBL, $teams->toKeyValue('PrimaryKey', 'TeamAbbrev'), $comparison); } else { throw new PropelException('filterByTeams() only accepts arguments of type \\Teams or Collection'); } }
/** * Clears the current object, sets all attributes to their default values and removes * outgoing references as well as back-references (from other objects to this one. Results probably in a database * change of those foreign objects when you call `save` there). */ public function clear() { if (null !== $this->aMlbTeamRef) { $this->aMlbTeamRef->removePlayers($this); } if (null !== $this->aCardRef) { $this->aCardRef->removePlayers($this); } if (null !== $this->aDivisionRef) { $this->aDivisionRef->removePlayers($this); } if (null !== $this->aPositionRef) { $this->aPositionRef->removePlayers($this); } if (null !== $this->aTeams) { $this->aTeams->removePlayers($this); } $this->id = null; $this->lastn = null; $this->bats = null; $this->bday = null; $this->age = null; $this->mlb = null; $this->draft_year = null; $this->position = null; $this->card = null; $this->d_e = null; $this->lg = null; $this->mwbl = null; $this->category = null; $this->comment = null; $this->mwbl_link = null; $this->mlb_link = null; $this->mwbl_link_enabled = null; $this->mlb_link_enabled = null; $this->create_ts = null; $this->maint_ts = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->applyDefaultValues(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * @param ChildTeams $teams The ChildTeams object to add. */ protected function doAddTeams(ChildTeams $teams) { $this->collTeamss[] = $teams; $teams->setLeagueRef($this); }