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