As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
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]! {
"user" : KCSUserCollectionName
when I then save loc (Which has all the properties set):
store.saveObject(
loc,
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")
)
alertView.show()
} 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
Brent
brent reusens
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):
store.saveObject(
loc,
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")
)
alertView.show()
} 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
Brent