/** * Exclude object from result * * @param ChildTourQuery $tourQuery Object to remove from the list of results * * @return $this|ChildTourQueryQuery The current query, for fluid interface */ public function prune($tourQuery = null) { if ($tourQuery) { $this->addUsingAlias(TourQueryTableMap::COL_ID, $tourQuery->getID(), Criteria::NOT_EQUAL); } return $this; }
/** * 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'); } }
/** * @param ChildTourQuery $tourQuery The ChildTourQuery object to add. */ protected function doAddTourQuery(ChildTourQuery $tourQuery) { $this->collTourQueries[] = $tourQuery; $tourQuery->setUser($this); }