Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whereNotEqualTo not working #85

Open
qandeelabbassi opened this issue May 25, 2018 · 1 comment
Open

whereNotEqualTo not working #85

qandeelabbassi opened this issue May 25, 2018 · 1 comment

Comments

@qandeelabbassi
Copy link

qandeelabbassi commented May 25, 2018

I have following live query for subscribing to class objects that do not belong to current user:

 ParseQuery<ParseObject> parseQuery = ParseQuery.getQuery("myclass");
        parseQuery.include("user");
        parseQuery.whereNotEqualTo("user", ParseUser.createWithoutData(ParseUser.class, ParseUser.getCurrentUser().getObjectId()));
        SubscriptionHandling<ParseObject> subscriptionHandling = parseLiveQueryClient.subscribe(parseQuery);
        subscriptionHandling.handleEvent(SubscriptionHandling.Event.CREATE, new SubscriptionHandling.HandleEventCallback<ParseObject>() {
            @Override
            public void onEvent(ParseQuery<ParseObject> query, ParseObject obj) {
            }
        });

It doesn't work, I am still getting objects that have current user in the "user" field. I can't find any problem in it, its a simple query.

@noaker
Copy link

noaker commented Dec 6, 2018

Happened to me too. It seems that the subscription only applies to the Class and ignores any constraints/restrictions specified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants