I'm running into a problem with updating objects in my local backing store in my iOS app. Lets say I have an object (in JSON format)
{
attr1: 'Hello',
attr2: 'World'
}
The corresponding NSManagedObject in my iOS app has two attributes: NSString *attr1 and attr2. On this initial JSON push, the object gets the correct values 'Hello' and 'World' in attr1 and attr2. The next from my backend server message returns the following JSON:
{
attr1: 'Hello2'
}
This updates my object's attr1 to 'Hello2', but my attr2 stays the same (i.e. 'World'). I want this to be nullified. In other words, I don't want an 'update' to my NSManagedObject, but rather I want a full reset. Is there a way to accomplish this? I have tried a few things like explicitly nullifying attributes and saving the NSManagedObjectContext, but this way doesn't seem to persist. Am i missing anything?