Beispiel #1
0
 /**
  * Exclude object from result
  *
  * @param   ChildTeam $team Object to remove from the list of results
  *
  * @return $this|ChildTeamQuery The current query, for fluid interface
  */
 public function prune($team = null)
 {
     if ($team) {
         $this->addUsingAlias(TeamTableMap::COL_ID, $team->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Beispiel #2
0
 /**
  * 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->aChampionship) {
         $this->aChampionship->removeMatch($this);
     }
     if (null !== $this->aRound) {
         $this->aRound->removeMatch($this);
     }
     if (null !== $this->aLeague) {
         $this->aLeague->removeMatch($this);
     }
     if (null !== $this->aHometeam) {
         $this->aHometeam->removeMatchRelatedByHometeamId($this);
     }
     if (null !== $this->aAwayteam) {
         $this->aAwayteam->removeMatchRelatedByAwayteamId($this);
     }
     $this->id = null;
     $this->nr = null;
     $this->date = null;
     $this->result = null;
     $this->toto = null;
     $this->championship_id = null;
     $this->round_id = null;
     $this->league_id = null;
     $this->hometeam_id = null;
     $this->awayteam_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Beispiel #3
0
 /**
  * Filter the query by a related \Haus23\Dtp\Model\Team object
  *
  * @param \Haus23\Dtp\Model\Team|ObjectCollection $team 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 ChildMatchQuery The current query, for fluid interface
  */
 public function filterByAwayteam($team, $comparison = null)
 {
     if ($team instanceof \Haus23\Dtp\Model\Team) {
         return $this->addUsingAlias(MatchTableMap::COL_AWAYTEAM_ID, $team->getId(), $comparison);
     } elseif ($team instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(MatchTableMap::COL_AWAYTEAM_ID, $team->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByAwayteam() only accepts arguments of type \\Haus23\\Dtp\\Model\\Team or Collection');
     }
 }