"Not in collection" query is not working

Hi!

I’m trying to fetch all users from database, except those related to a set of UID’s.
I have written this query but when UIDs list has more than one element, for some reason, the “not” clause does not work and it returns me all registered users.

(d/q '[:find (pull ?e [*])
       :in $ [?uids ...]
        :where [?e :user/id ?uid]
               (not [?e :user/id ?uids])]
     db ["user-uid-1" "user-uid-2" "user-uid-3"])

When UID’s list contains a single element, the query works properly (it returns all users, except the user with specified UID).

Any ideas of what could be wrong?

1 Like

Same problem here :confused: