Esempio n. 1
0
 /**
  * Filter the query by a related \SpoilerWiki\Canon object
  *
  * @param \SpoilerWiki\Canon|ObjectCollection $canon the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildWorkTypeQuery The current query, for fluid interface
  */
 public function filterByCanon($canon, $comparison = null)
 {
     if ($canon instanceof \SpoilerWiki\Canon) {
         return $this->addUsingAlias(WorkTypeTableMap::COL_ID, $canon->getWorkTypeId(), $comparison);
     } elseif ($canon instanceof ObjectCollection) {
         return $this->useCanonQuery()->filterByPrimaryKeys($canon->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByCanon() only accepts arguments of type \\SpoilerWiki\\Canon or Collection');
     }
 }