Example #1
0
 /**
  * Exclude object from result
  *
  * @param   ChildLeague $league Object to remove from the list of results
  *
  * @return $this|ChildLeagueQuery The current query, for fluid interface
  */
 public function prune($league = null)
 {
     if ($league) {
         $this->addUsingAlias(LeagueTableMap::COL_ID, $league->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Example #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);
 }
Example #3
0
 /**
  * Filter the query by a related \Haus23\Dtp\Model\League object
  *
  * @param \Haus23\Dtp\Model\League|ObjectCollection $league 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 filterByLeague($league, $comparison = null)
 {
     if ($league instanceof \Haus23\Dtp\Model\League) {
         return $this->addUsingAlias(MatchTableMap::COL_LEAGUE_ID, $league->getId(), $comparison);
     } elseif ($league instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(MatchTableMap::COL_LEAGUE_ID, $league->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByLeague() only accepts arguments of type \\Haus23\\Dtp\\Model\\League or Collection');
     }
 }