/** * Filter the query by a related Item object * * @param Item|PropelCollection $item 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 */ public function filterByItemRelatedByPackageId($item, $comparison = null) { if ($item instanceof Item) { return $this->addUsingAlias(ItemPeer::PACKAGE_ID, $item->getId(), $comparison); } elseif ($item instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ItemPeer::PACKAGE_ID, $item->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByItemRelatedByPackageId() only accepts arguments of type Item or PropelCollection'); } }