コード例 #1
0
ファイル: TipQuery.php プロジェクト: haus23/dtp.model
 /**
  * Filter the query by a related \Haus23\Dtp\Model\Match object
  *
  * @param \Haus23\Dtp\Model\Match|ObjectCollection $match 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 ChildTipQuery The current query, for fluid interface
  */
 public function filterByMatch($match, $comparison = null)
 {
     if ($match instanceof \Haus23\Dtp\Model\Match) {
         return $this->addUsingAlias(TipTableMap::COL_MATCH_ID, $match->getId(), $comparison);
     } elseif ($match instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TipTableMap::COL_MATCH_ID, $match->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByMatch() only accepts arguments of type \\Haus23\\Dtp\\Model\\Match or Collection');
     }
 }