Find - Column 'created' in order clause is ambiguous

I have this code:

 Types.tryblock({ () -> Void in
 let queryOptions = QueryOptions()
 queryOptions.relationsDepth = 0;
 queryOptions.pageSize = 20
 queryOptions.offset = queryOptions.pageSize.integerValue * page
 queryOptions.sortBy(["created desc"])
 queryOptions.related = ["challenge", "challenge.topPhotograph", "image"]; // Load the challenge as well
 let dataQuery = BackendlessDataQuery()
 dataQuery.queryOptions = queryOptions;
 dataQuery.whereClause = "owner.objectId = '\(user.objectId)'"
 Backendless.sharedInstance().persistenceService.find(Photograph.ofClass(), dataQuery: dataQuery, response: { (collection : BackendlessCollection!) -> Void in
 success(photos: as! [Photograph])
 }, error: { (fault : Fault!) -> Void in
 catchblock: { (exception) -> Void in
 print("(FAULT): \(exception as! Fault)")

Gettings this error:

java.lang.RuntimeException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'created' in order clause is ambiguous

I’m receiving same problem. The line of code that generates it for me is

[query.queryOptions setSortBy:[NSArray arrayWithObject:[NSString stringWithFormat:@“created asc”]]];

When I comment this line of code, all works well but, obviously, the objects are not sorted.
Please, let us know something about this problem because I have sent an update and if there is something that I have to change in my code, I need to reject the binary asap.

Hi guys!

Sorry for this inconvenience.
We are working on this issue. It will be fixed tomorrow.


Hi guys!

Are there news about this problem?

We updated production server. Could you try it again?

Sorting seems working again. :slight_smile:

Yes, it are working for me too now.