Support Topics Documentation Slack YouTube Blog

duplicate rows from query


(gil Versokler) #1

Hi,
I getting duplicate rows from query that worked fine always.
It’s happened IOS & android SDK
I ran same query in Backendlesss console and i’ve notice GeoPoint field with query look like unattached but without query it’s look fine.
i’ve attached some screenshots
1.
Query:
stringBuilder = [NSString stringWithFormat:@“categoryId = %i AND distance( %f, %f, gameCoordinates.latitude, gameCoordinates.longitude ) < km(%i) AND matchDate >= ‘%@’”,
catId,[userCurrentLocation.latitude doubleValue],[ userCurrentLocation.longitude doubleValue],distanceInKm, dateMatchRequestedString] ;
DataQueryBuilder *queryBuilder = [[DataQueryBuilder alloc] init];

[queryBuilder setWhereClause:stringBuilder];

/// set related columns

[queryBuilder addRelated:@“gameCoordinates”];
[queryBuilder addRelated:@“venue_ref”];
[queryBuilder addRelated:@“statistics”];
[queryBuilder addRelated:@“home_ref”];
[queryBuilder addRelated:@“visitor_ref”];

// request sorting
NSArray<NSString *> *sortBy = @[@“matchDate”,@“gameCoordinates”];
[queryBuilder setSortBy:sortBy];

// set offset and page size
[queryBuilder setPageSize:20];
[queryBuilder setOffset:offset];

//[queryBuilder prepareNextPage];
// =====Synchronous =====
//3. Execute QUERY : Retrieve game objects for the parameters set in query builder
gameArray = [gameStorage find:queryBuilder];

GeoQueryIssue.pdf (239.79kB)


(Mark Piller) #2

Hi Gil,

Please let us know your application ID so we can check the issue.

Regards,
Mark


(gil Versokler) #3

Hi Mike,

I’ve sent to your email.

Regards,
Gil


(Sergey Chupov) #4

Hi Gil,

Thanks for reporting, we’ve opened an internal task BKNDLSS-15853 to fix the issue. We’ll get back to you in this topic when there are any news.


(gil Versokler) #5

Hi Sergey,

I’ve noticed any query with GEOPOINT cause this issues. (it’s might help for solve).

Thanks


(gil Versokler) #6

Hello Sergey,

There is any progress? this issue cause delay us to launch app.

Please keep us posted ASAP.

Thank’s,
Gil


(Sergey Chupov) #7

Hi Gil,

The issue has been in a roadmap, so there hasn’t been any progress yet. We’ll increase its priority in a list considering that it blocks your release.
Will keep you updated it this topic, thanks for your patience!


(Sergey Chupov) #8

Could you please provide an additional example of a query? I’ve been able to reproduce the duplicates in response only with ‘distance’ query like

distance( 13.720869, 100.517069, gameCoordinates.latitude, gameCoordinates.longitude ) < km(20000)