Skip to content

Combination of notEqualTo is not working #1596

Closed
@lolobosse

Description

@lolobosse

Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Hi there,

I think we're not totally done with the issue #1349 and the PR #1350 just solved it partially...

@drew-gross thought that we will be running into trouble for combination and he was... right 😢

I tried to extend the test cases but there is no guide of how to run the server properly and I got some weird errors everytime (btw is there a runnable docker with proper instruction that can be run on a shitty machine just to do the tests?)

So I'll try to explain the problem as precisely as possible: "You have a cake and this cake has fan and haters".

If you want to see the cakes that Mister X didn't rated yet, you will (on Parse.com) have something like this:

var queryCake = new Parse.Query(Cake);
queryCake.notEqualTo("likes", MisterX);
queryCake.notEqualTo("dislikes", MisterX);

And, logically it returns you: all the cakes - the cakes he likes - the cakes he dislikes = all the cakes he doesn't have a opinion on or the cakes he doesn't know about.

The current status:
At the moment, it works really well with one condition but the intersection is not working, I guess: I can have all the cakes he doesn't know about or he hates (noIdea || dislike) or all the cakes he doesn't know about or he likes (noIdea || like).

My knowledge about mongo are pretty limited but is this possible that the two conditions are joined with a or and not with an and (as it logically should)?

Nevertheless, I can make two queries and the intersection myself but that's really bad design to me...

If someone gives me access to a working test machine or provide me a decent tutorial which works on a shitty linux, I promise to write the test case myself 😬 😉 🎉

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions