Beispiel #1
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');
     }
 }