Retrieve Related Data With API - All seems OK, but system don't accept it

val queryBuilder = DataQueryBuilder.create()
queryBuilder.setRelated( "cityOfResidence" )
queryBuilder.whereClause = "name = 'Tommy'"

val result = Backendless.Data.of("Person").find(queryBuilder)

//Print out returned data
for (match in result){
   for (entry in match){
       println("${entry.key} => ${entry.value}")

I run this Kotlin code, after initializing Backendless. The print out is as expected: the fields of the person object, where one is the “cityOfResidence” which points to a city object (a map object). “cityOfResidence” is a relation with table named “City”.

But I don’t get credited with an accepted solution…

Hi @Tommy_76

In your code you have

whereClause = "name = 'Tommy'"

It is very important to use in your code exactly what is specified in the description for the mission.
In JS code below this task is written to use

setWhereClause("name = 'Joe'")

Try to change the name, in order to pass the task.
If you have any problems, just let us know. We will kindly help you.


That was the problem. Thank you!