/** * Filter the query by a related ItemSubType object * * @param ItemSubType|PropelObjectCollection $itemSubType The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ItemQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByItemSubType($itemSubType, $comparison = null) { if ($itemSubType instanceof ItemSubType) { return $this->addUsingAlias(ItemPeer::ITEM_SUB_TYPE_ID, $itemSubType->getId(), $comparison); } elseif ($itemSubType instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ItemPeer::ITEM_SUB_TYPE_ID, $itemSubType->toKeyValue('Id', 'Id'), $comparison); } else { throw new PropelException('filterByItemSubType() only accepts arguments of type ItemSubType or PropelCollection'); } }