Save item with Swift

I am trying to make a question and answer type app to mimic Quora.
I have created the entities and have the persistance connection working and verified. When I try to create a new question from user input, I get this error.

[<BloQuery2.Question 0x1072937a0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key ___class.

I have looked all thru the documentation and online, cannot find reference to ___class.
When the user clicks the button, the app crashes. However, online, the question gets created, but without text.

Here is my code.

On AddQuestionViewController

 @IBAction func addQuestion(sender: UIButton) {
 var result : AnyObject?
 var fault : Fault?
 result =
 if (result is Question) {
 let obj : AnyObject = backendless.persistenceService.findByObject(Question)
 if (obj is Question) {
 let obj1 = obj as! Question
 print("\nQuestion (1): \(obj1.description)")
 userQuestion.text = obj1.question
 if (result is Fault) {
 print("Something went wrong")

and the QuestionEntity.swift file

import UIKit
import Foundation

class Question: NSObject {
 var question : String?
 var userName : String?
 var objectId: String?
 var created : NSDate?
 var owner:BackendlessUser?

Hi Eric!

I can reproduce this issue. We will investigate this use case.
But I saw that after commenting line with …persistenceService.findByObject(Question)
app not crashes. I think problem was caused by this method.

Hi Eric,

PersistenceService ‘findByObject’ mehods are used only for external DB - you should use another ‘find…’ methods, foe example, ‘findById’ :

    func findByIdAsync() {
        let contact = Contact() = "Jack Daniels"
        contact.age = 147 = "777-777-777"
        contact.title = "Favorites"
        let dataStore =
            response: { (result: AnyObject!) -> Void in
                let savedContact = result as! Contact
                print("Contact has been saved: \(savedContact.objectId)")
                    response: { (result: AnyObject!) -> Void in
                        let foundContact = result as! Contact
                        print("Contact has been found: \(foundContact.objectId)")
                    error: { (fault: Fault!) -> Void in
                        print("Server reported an error (2): \(fault)")
            error: { (fault: Fault!) -> Void in
                print("Server reported an error (1): \(fault)")

I’ve created a sample for you -, it works fine for me, you can try it and compare with your project.

Thank you, this solved this problem.