/** * Filter the query by a related \keeko\core\model\Session object * * @param \keeko\core\model\Session|ObjectCollection $session 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 filterBySession($session, $comparison = null) { if ($session instanceof \keeko\core\model\Session) { return $this->addUsingAlias(UserTableMap::COL_ID, $session->getUserId(), $comparison); } elseif ($session instanceof ObjectCollection) { return $this->useSessionQuery()->filterByPrimaryKeys($session->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterBySession() only accepts arguments of type \\keeko\\core\\model\\Session or Collection'); } }