Step to reproduce:
1/ Save 3 scores using "Saving additional Data along with Score" service.
Acctually that now I have 3 records:
-
Score 10 with additonal json {name: "John", age: "30"}
-
Score 11 with additonal json {name: "Foo", age: "25"}
-
Score 15 with additonal json {name: "Bar", age:"18"}
2/ Now I start use "Fetch Additional data in leaderboard" service
var gameName:String="MyGame";
var max:int= 5;
var key1:String = "name";
var value1:String = "John";
App42API.setDbName("MyDatabaseName");
var query:Query = QueryBuilder.build(key1, value1, Operator.EQUALS);
scoreBoardService.setQuery( "MyCollectioname", query);
scoreBoardService.getTopNRankers(gameName, max , new callback());
I expected the result was only one record of user named John, but actually all 3 three records returned!??
Our game is now feature on Apple store using App42 services, that's a good decision we made. We are deloping the next version and face this issue, please support us. Thank App42 team.
edited: change from scoreBoardService.setQuery( "MyDocument", query); to scoreBoardService.setQuery( "MyCollectioname", query); to make it clear.