let query = DataQueryBuilder.init()
_ = query?.setRelationsDepth(2)
_ = query?.setWhereClause("objectId = '\(objectId!)'")
Backendless.sharedInstance().data.of(BackendlessUser.self).find(query, response: { (res) in
if let freshUser:[BackendlessUser] = res as? [BackendlessUser]
freshUser does not contains all properties defined + I can access them using REST
APPID:02E0B487-71CE-DB1E-FF7F-79892D128500
I tried to use UserService to load object, tried to load it by findID method and even specify some of those fields explicitly using DataQueryBuilder.
Now if I call print(backendlessUser.getProperties())
[“objectId”: A862078E-F402-4CE5-FF2F-7F2386418900, “name”: Tomasko Najkrajsi, “email”: radvansky.tomas@gmail.com, “__meta”: <null>, “password”: <null>]
But there are no fields such as status, online, photo…which are defined
Now I updated SDK from 4.0.21 -> 4.0.22 and now app is not working at all, because of:
-[StringType copyWithZone:]: Error caused by accessing and converting currentUser objectID -> String:
let userID:String = String.init(Backendless.sharedInstance().userService.currentUser.objectId)
Thing is that objectId is not as declared type NSString BUT some StringType (your class).