0

It's so wired parse query in array of pointer can't work on 4.4 below and everything working fine for 5 + ,

ParseQuery<ParseObject> firstQuery = new ParseQuery<ParseObject>(CLASSNAME);
    firstQuery.whereEqualTo(COLOUMNNAME1, ParseUser.getCurrentUser());

    ParseQuery<ParseObject> secondQuery = new ParseQuery<ParseObject>(CLASSNAME);
    secondQuery.whereEqualTo(COLOUMNNAME2, ParseUser.getCurrentUser());

    List<ParseQuery<ParseObject>> queries = new ArrayList<ParseQuery<ParseObject>>();
    queries.add(firstQuery);
    queries.add(secondQuery);

    ParseQuery<ParseObject> mainQuery = ParseQuery.or(queries);

Second query is array of parse user pointers.

Note : In Android 5 return all matched data in both. in Android 4.4 return all matched data in first query only.

4
  • What's the first query doing differently exactly? Commented May 9, 2017 at 15:48
  • Did you use parse debug logging to make sure it's going to the same database? Commented May 9, 2017 at 22:47
  • @JakeT. first query filter in coloumn of parse user and working for both 4.4 and 5 + Commented May 10, 2017 at 8:33
  • @nasch yes same db Commented May 10, 2017 at 8:34

1 Answer 1

1

It seems there's been a fix for this as of 5 days ago, though there isn't additional feedback that it has worked: https://github.com/parse-community/parse-server/issues/175

Make sure you're on the latest parse-server and maybe it'll work.

Beyond that, two solutions are offered: 1) Refactor your code to store arrays of objectIds rather than pointers. This is not broken.

2) Refactor your code to instead of calling whereEqualTo, you call whereContainsAll, and pass a single element array with the pointer you need. This function does not seem broken.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you it's working now after using whereContainsAll

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.