parse-community / Parse-SDK-Flutter

The Dart/Flutter SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
573 stars 188 forks source link

QueryBuilder().count() does not work when we add QueryBuilder().whereWithinKilometers() query for parse objects. #964

Open hgandhi67 opened 1 year ago

hgandhi67 commented 1 year ago

Issue Description

QueryBuilder().count() method does not work when we add whereWithinKilometers() query for any parse objects in QueryBuilder.or(EventsModel(),[query1 , query2]).

It returns InternalServerError, where as QueryBuilder().query() works completely fine in QueryBuilder.or(EventsModel(),[query1 , query2]) and returns the results as expected.

Steps to reproduce

final query1 = QueryBuilder(EventsModel());
query1.whereEqualTo(keyStatus, EVENT_STATUS_APPROVED);
query1.whereGreaterThanOrEqualsTo(keyDate, oneHrBeforeTime);
query1.whereContainedIn(keyEventStatus, [EVENT_STATUS_ONGOING, EVENT_STATUS_RESCHEDULED]);

final query2 = QueryBuilder(EventsModel());
query2.whereValueExists(keyRecurrentEvent, true);
query2.whereEqualTo(keyRecurrentEvent, true);
query2.whereEqualTo(keyStatus, EVENT_STATUS_APPROVED);
query2.whereContainedIn(keyEventStatus, [EVENT_STATUS_ONGOING, EVENT_STATUS_RESCHEDULED]);

final mergedQuery = QueryBuilder.or(EventsModel(), [query1, query2]);
mergedQuery.whereWithinKilometers(keyGeoPoint, currentUser.getGeoPoint!, 100);
mergedQuery.orderByDescending(EventsModel.keyTime);
mergedQuery.setLimit(100);

final response = await mergedQuery.count();

Actual Outcome

Status Code: 1 Type: InternalServerError Error: null

image

Expected Outcome

Function: ParseApiRQ.query Status Code: 200 Payload: [EventsModel(), EventsModel(), EventsModel()]

Environment

Parse Flutter SDK

Server

Logs

image

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this issue!

hgandhi67 commented 11 months ago

Any updates on this issue??

hgandhi67 commented 9 months ago

Do we have any timeline on this issue please? or any updates?

zahidshaikh08 commented 5 months ago

Any updates on this?