/** * Filter the query by a related Dept object * * @param Dept $dept the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return TermQuery The current query, for fluid interface */ public function filterByDept($dept, $comparison = null) { if ($dept instanceof Dept) { return $this->addUsingAlias(TermPeer::ID, $dept->getTermId(), $comparison); } elseif ($dept instanceof PropelCollection) { return $this->useDeptQuery()->filterByPrimaryKeys($dept->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByDept() only accepts arguments of type Dept or PropelCollection'); } }