Hi team. Thank for your great work. I have a issues with creating object.
Example, I have json:
{
name: "Test"
gender: 0
income: 30000
}
I use MR_importFromObject to create a NSManagedObject from json data
class func importFromJSON(json: JSON) -> User {
let user = User.MR_importFromObject(json.dictionaryObject!)
user.save()
return user
}
The problem is when the user profile change and refresh to get new data. The new json will be:
{
name: "Test A"
gender: 0
}
But the NSManagedObject return by the function above still contains the property of "income" with old value. It should be nil. It looks like that the function merge with existing object instead of create a new object and delete the exist object. Please help me to fix this. Thanks a lot.
Hi team. Thank for your great work. I have a issues with creating object. Example, I have json:
I use MR_importFromObject to create a NSManagedObject from json data
The problem is when the user profile change and refresh to get new data. The new json will be:
But the NSManagedObject return by the function above still contains the property of "income" with old value. It should be nil. It looks like that the function merge with existing object instead of create a new object and delete the exist object. Please help me to fix this. Thanks a lot.