/** * Filter the query by a related AreaAssignment object * * @param AreaAssignment|PropelObjectCollection $areaAssignment the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return UserQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByAreaAssignment($areaAssignment, $comparison = null) { if ($areaAssignment instanceof AreaAssignment) { return $this->addUsingAlias(UserPeer::ID, $areaAssignment->getUserId(), $comparison); } elseif ($areaAssignment instanceof PropelObjectCollection) { return $this->useAreaAssignmentQuery()->filterByPrimaryKeys($areaAssignment->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByAreaAssignment() only accepts arguments of type AreaAssignment or PropelCollection'); } }