Start a new topic

cannot map 'X' , a non-existant property

I am trying to save an object to a collection and get the above answer.

The object's class  is defined as:

class Location : NSObject, KCSPersistable {

var objectId: String?

var long: Double?

var dat: NSDate?

var user: KCSUser?

var latt: Double?

var metdata: KCSMetadata?

internal override func hostToKinveyPropertyMapping() -> [NSObject : AnyObject]! {

return [

"objectId" : KCSEntityKeyId,

"dat" : "date",

"user" : "user",

"long" : "longitude",

"latt" : "lattitude",

"metadata" : KCSEntityKeyMetadata



internal static override func kinveyPropertyToCollectionMapping() -> [NSObject : AnyObject]! {

return [

"user" : KCSUserCollectionName




when I then save loc (Which has all the properties set):



withCompletionBlock: { (objectsOrNil: [AnyObject]!, errorOrNil: NSError!) -> Void in

if errorOrNil != nil {

let alertView = UIAlertView(

title: NSLocalizedString("Save failed", comment: "Save Failed"),

message: errorOrNil.localizedFailureReason, //not actually localized

delegate: nil,

cancelButtonTitle: NSLocalizedString("OK", comment: "OK")


} else {

managedContext.deleteObject(x as! NSManagedObject)



withProgressBlock: nil


I get for message:

cannot map 'long' , a non-existant property

What am I doing wrong?

Thank you


Login or Signup to post a comment