/**
  * Filter the query by a related Term object
  *
  * @param     Term|PropelCollection $term The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    DeptQuery The current query, for fluid interface
  */
 public function filterByTerm($term, $comparison = null)
 {
     if ($term instanceof Term) {
         return $this->addUsingAlias(DeptPeer::TERM_ID, $term->getId(), $comparison);
     } elseif ($term instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(DeptPeer::TERM_ID, $term->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByTerm() only accepts arguments of type Term or PropelCollection');
     }
 }