/**
  * Filter the query by a related ItemSubType object
  *
  * @param   ItemSubType|PropelObjectCollection $itemSubType  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   ItemTypeQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterBySubType($itemSubType, $comparison = null)
 {
     if ($itemSubType instanceof ItemSubType) {
         return $this->addUsingAlias(ItemTypePeer::ID, $itemSubType->getMainTypeId(), $comparison);
     } elseif ($itemSubType instanceof PropelObjectCollection) {
         return $this->useSubTypeQuery()->filterByPrimaryKeys($itemSubType->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterBySubType() only accepts arguments of type ItemSubType or PropelCollection');
     }
 }