I have Interest table ->(Name, Description) and I have one row with the (“Squash”, “No description”).
And I wrote this code to retrieve an interest given its name.
func findInterestByName(name:String)->Interest? {
let whereClause = "Name = \(name)"
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = whereClause
var error: Fault?
let bc = Backendless.sharedInstance().data.of(Interest.ofClass()).find(dataQuery, fault: &error)
if error == nil {
print("Interest have been found: \(bc.data)")
return bc.data as! Interest
}
else {
print("Server reported an error: \(error)")
return nil
}
}
And when I execute the above code I get the following error
Optional(FAULT = '1017' [Invalid where clause. Not Existing columns: Squash] <Invalid where clause. Not Existing columns: Squash> )
This is the schema for interest table