1
votes

I have an events class with a "Creators" field that is an array type which contains pointers to multiple users in the _User class. Now I need to find all events that weren't created by specific user.

I'm close to what I need by querying the Events class where: {"Creators":{"$nin":[{"__type":"Pointer","className":"_User","objectId":"0LxcyWcbvv" }]}}

The result excludes only the events where user 0LxcyWcbvv is the only user in the array. It doesn't exclude events where multiple users (including user 0LxcyWcbvv) are present - which is what I need.

This is how a multiple user array looks in my databrowser: [{"__type":"Pointer","className":"_User","objectId":"KIDK1Ekzy7"},{"__type":"Pointer","className":"_User","objectId":"0LxcyWcbvv"}]

1

1 Answers

0
votes

The problem wasn't in my rest query but in one of the fields that were wrongly constructed during some testing. The query in the question works fine!