/** * Filter the query by a related \Models\Ban object * * @param \Models\Ban|ObjectCollection $ban 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 filterByBanRelatedByBannedBy($ban, $comparison = null) { if ($ban instanceof \Models\Ban) { return $this->addUsingAlias(UserTableMap::COL_ID, $ban->getBannedBy(), $comparison); } elseif ($ban instanceof ObjectCollection) { return $this->useBanRelatedByBannedByQuery()->filterByPrimaryKeys($ban->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByBanRelatedByBannedBy() only accepts arguments of type \\Models\\Ban or Collection'); } }