Parse-SDK-Android icon indicating copy to clipboard operation
Parse-SDK-Android copied to clipboard

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

Open ddlo86 opened this issue 10 years ago • 2 comments

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

ddlo86 avatar Aug 19 '16 00:08 ddlo86

Hi,

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

patmelua avatar Aug 29 '16 09:08 patmelua

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

felipesouto avatar May 18 '17 17:05 felipesouto