I am in the process of converting a few synchronous methods to asynchronous methods. After converting the methods I threw the following 1017 error. What’ interesting is that I did not change the where clause when I changed to the asynchronous method. Is there a reason a where clause would work for a synchronous method and not an asynchronous version?
Where Clause
let whereClause = "username = '" + usernameEntry + "'"
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = whereClause
Synchronous Code
var fault: Fault?
let data = backendless.data.of(BackendlessUser.ofClass()).find(dataQuery, fault: &fault)
if fault == nil
{
if data.totalObjects.intValue == 0
{
...
}
else if data.totalObjects.intValue >= 1
{
...
}
else
{
...
}
}
else
{
// Handle fault.
}
Asynchronous Code
self.backendless.data.of(NewEmailUser.ofClass()).find(dataQuery, response: {(result : BackendlessCollection!) -> () in
if result.totalObjects.intValue == 0
{
...
}
else if result.totalObjects.intValue >= 1
{
...
}
else
{
...
}
}, error: { (fault : Fault!) -> ()in
...
})