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