/** * Filter the query by a related \EventInterest object * * @param \EventInterest|ObjectCollection $eventInterest the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildEventQuery The current query, for fluid interface */ public function filterByInterest($eventInterest, $comparison = null) { if ($eventInterest instanceof \EventInterest) { return $this->addUsingAlias(EventTableMap::COL_EVENT_ID, $eventInterest->getTargetEventId(), $comparison); } elseif ($eventInterest instanceof ObjectCollection) { return $this->useInterestQuery()->filterByPrimaryKeys($eventInterest->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByInterest() only accepts arguments of type \\EventInterest or Collection'); } }