FAULT = '1010' [Column Users does not exist]

I have a classes

class Images: NSObject {
var delegate: ImagesChangeDelegate?
var createdPhotoDate: Date?
var address: String?
var title: String?
var imagePath: String?
var latitude: Double = 0.00
var longitude: Double = 0.00
var likes = [Likes()]
var comments = [Comments()]
var objectId: String?
var ownerId: String?
var created: Date?
var updated: Date?
var photoRecordState = PhotoRecordState.New

var image: UIImage?

}
class Comments: NSObject {

var comment: String?

var objectId: String?

var ownerId: String?

var created: Date?

var updated: Date?

}

and when I want get related comments I call
func getCommentsFor(image: Images) {
let relQureyBuilder = LoadRelationsQueryBuilder.init(with: Comments().ofClass())
relQureyBuilder!.setGetRelationName(“comments”)

    imagesStore = API.sharedInstance.backendless.data.of(Images.ofClass())
    imagesStore?.loadRelations(image.objectId, queryBuilder: relQureyBuilder,
                               response: { (result) -> () in
        if let comments = result as? [Comments] {
            for comment in comments {
                print(comment.comment ?? "ДБК")
            }
        }
    }, error: { (fault) in
        print(fault ?? "НО")
    })

}

in response I get error
FAULT = ‘1010’ [Column Users does not exist] <Column Users does not exist>

I tried another variant of function getCommentsForImage
But I always get an error
FAULT = ‘1010’ [Column Users does not exist] <Column Users does not exist>

please healp, whats wrong?

Hi,

Please provide your application ID. Also please send us a minimal sample code, which we could run and reproduce the problem.

Готово

Thanks, I’ve created an internal task BKNDLSS-15677 to investigate the issue. We’ll notify you as soon as we have any news.

App ID: 64BE0578-2D48-34AD-FFE7-A0194FA8DE00

class Images: NSObject {
var createdPhotoDate: Date?
var address: String?
var title: String?
var imagePath: String?
var latitude: Double = 0.00
var longitude: Double = 0.00
var comments = [Comments()]
var objectId: String?
var ownerId: String?
var created: Date?
var updated: Date?

var image: UIImage?
}
class Comments: NSObject {
var comment: String?
var objectId: String?
var ownerId: String?
var created: Date?
var updated: Date?

}

func getCommentsFor() {

let relQureyBuilder = LoadRelationsQueryBuilder.init(with: Comments().ofClass())

relQureyBuilder!.setGetRelationName(“comments”)

imagesStore = API.sharedInstance.backendless.data.of(Images.ofClass())

imagesStore?.loadRelations(“8C33EAB3-24E6-E516-FFBE-1080ECB33D00”, queryBuilder: relQureyBuilder,

response: { (result) -> () in

if let comments = result as? [Comments] {

for comment in comments {

print(comment.comment ?? “ДБК”)

}

}

}, error: { (fault) in

print(fault ?? “НО”)

})
}

Good day, is task BKNDLSS-15677 done?

Hello,

It’s in progress. Will be fixed in the upcoming release which is planned to be early next week.

Regards Anton

Hello,
This issue has been fixed in the newest release of iOS-SDK 4.0.10. Please, update and verify wether everything works now.

Regards, Olga