/** * Filter the query by a related Store object * * @param Store|PropelObjectCollection $store The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return VisitationQuery 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(VisitationPeer::STORE_ID, $store->getId(), $comparison); } elseif ($store instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(VisitationPeer::STORE_ID, $store->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByStore() only accepts arguments of type Store or PropelCollection'); } }