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

.whereEqualTo("array", pointer) returns empty list below Lollipop (5.0) #514

Closed
ddlo86 opened this issue Aug 19, 2016 · 2 comments
Closed

Comments

@ddlo86
Copy link

ddlo86 commented Aug 19, 2016

With com.parse:parse-android:1.13.1, I'm unable to use the function whereEqualTo with pointers for devices less than API 20. Take my code below:

ParseQuery<JobDriver> driverQuery = ParseQuery.getQuery(JobDriver.class);
driverQuery.include("driver");
driverQuery.whereEqualTo("driver", ParseObject.createWithoutData(Driver.class, currentDriver.getObjectId()));
driverQuery.findInBackground(new FindCallback<JobDriver>() {
                        @Override
                        public void done(final List<JobDriver> drivers, ParseException e) {
                            if (e != null) {
                                Timber.e("Error finding driver: %s", e.getMessage());
                            } else {
                                Timber.d("Job size: %s", drivers.size());

With APIs 20 and above, the code works fine and produces a list of Drivers. But 4.4.4 and below returns an empty list (no error).

I've found a work around for the moment by using whereContainedIn() and comparing the "driver" column to a List with the single Driver object, where the "driver" column is an Array of Drivers.

JobDriver Table:
image

@patmelua
Copy link

Hi,

I've the same problem. Works great for API > 19 but not for API < 20.
Any ideas ?

@felipesouto
Copy link

I had the same issue, but apparently the problem was solved by upgrading Parse Server version to 2.4.0 (see: parse-community/parse-server#3169).

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

4 participants