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