Esempio n. 1
0
 /**
  * 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    ItemQuery The current query, for fluid interface
  */
 public function filterBySectionHasItem($sectionHasItem, $comparison = null)
 {
     if ($sectionHasItem instanceof SectionHasItem) {
         return $this->addUsingAlias(ItemPeer::ID, $sectionHasItem->getItemId(), $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');
     }
 }