Support Topics Documentation Slack YouTube Blog

BackendlessGeoQuery with whereClause issue

(Pavel Razrabotchikov) #1

I want to fetch geopoints. I use this code:

NSString *whereClauseGeo = @"objectId = 


   \' OR objectId = 


BackendlessGeoQuery *queryGeo = BackendlessGeoQuery queryWithCategories:@[kBaaS_location_category_user]];
queryGeo.whereClause = whereClauseGeo;
            queryGeo.includeMeta = @YES;
backendless.geoService getPoints:queryGeo response:^(BackendlessCollection *collectionGeo) {
error:^(Fault *fault) {

And it fetches empty array. But if I remove the string queryGeo.whereClause = whereClauseGeo; it fetches all the objects (and some of their objectId are exactly the same as in whereClause).

So my conclusion is that whereClause doesn’t work for BackendlessGeoQuery now. Can you fix that?

(Mark Piller) #2

You’re correct geo queries do not work the same way as data queries. Geo queries operate on metadata properties. If you duplicate object id in geo point metadata, you will be able to run the same query.


(Pavel Razrabotchikov) #3

So whereClause is a search in metadata?

(Mark Piller) #4


(Pavel Razrabotchikov) #5

Thank you