Fetch SomeTable objects where "users.objectId != 'some-id'"

Hi all. I think about this problem for weeks, but I can’t find no one good solution. May be I can’t understand something or it’s really a bug.

We have a table, for example “SomeTable” with users one-to-many relation field, field name is “users”.
And, for example, in this table exists one object O with users “A(objectId=‘a’), B(objectId=‘b’)”
So… we want to find all objects from SomeTable which contains user B. Where clause for this query “users.objectId = ‘b’”. I think that is correct and we obtained correct result: O.
But now we want to find all objects from SomeTable which NOT contains user B. Logically where clause should be is "users.objectId != ‘b’’, but we still obtained O - this is a big question and problem for me, because for this example my expected result: no objects. Or may be I am wrong?

If it’s not a bug, please prompt me a correct solution.

I tried to get around this problem: fetch all objects and manually skip objects that not contains user with objectId = ‘b’, but it’s not work in practice, because: incorrect work of pagination, limits for objects per query, time limits, etc…

The problem is that you have one to many relation. So for example you have table Parent and table Child

Child contains records with objectId aC, bC, cC, dC

Parent contains record with objectId aP, bP. Also there is column rel which is relation one to many to child

aP has relation to aC and bC
bP has relation to cC and dC

so if you make find for Parent table with query=“rel.objectId != ‘aC’” you will get both records aP and bP because aP also contains bC, that is match your query

but if you make find for Parent table with query=“rel.objectId not in (‘aC’,‘bC’)” you will get only bP

"because aP also contains bC, that is match your query " - yes, I understand this, but I don’t know that is it correct. For example, in Realm database other behaviour: query=“rel.objectId != ‘aC’” returns only bP, because it is has the meaning. Current backendless logic for “!=” that you described illogically for my opinion. I am or Realm logic is wrong?

To confirm my words in Mongo DB also behaviour that I described for $ne operator: for example http://stackoverflow.com/questions/10907843/mongo-ne-query-with-an-array-not-working-as-expected