I'm working with RestKit 0.27.0 and have managed to setup my Core Data stack almost exactly like in the TwitterCoreData example in RestKits GitHub.
I've also mapped GET / POST requests which are persisting the Objects in Core Data correctly, though I am having trouble with my PUT request.
It appears that my PUT request is updating the object on the server correctly, and I can see it updated on the response. I then go to refresh the SQLite DB Viewer expecting the Entity to have been updated, but it hasn't.
Take addressLine1 for example, it was set to: "4 Some Address". I then update it to "4 TEST THIS CHANGE" on the NSManagedObject and pass it through as the Object on the PUT.
I can see the following in the logs:
2017-03-02 15:05:18.006 Albert[41779:1232025] T restkit.object_mapping:RKMappingOperation.m:748 Skipped mapping of attribute value from keyPath 'addressLine1 to keyPath 'addressLine1' -- value is unchanged (4 TEST THIS CHANGE)
It's almost as if because I've updated the addressLine1 value on the NSManagedObject, that RestKit doesn't pick it up as a change?
When I log back into my app it performs a GET request and when it gets the Object, it realises that there is a difference between the transient Object and the Entity stored in CoreData and so updates it successfully.
I can't find any putObject: documentation that can help me understand where I am going wrong, so based on the latest version of RestKit (0.27.0 as of the time of writing) - It would be good to be provided with or directed to an example starting from referencing an existing NSManagedObject, updating a property (attribute) on it, and then sending it as an argument in the PUT request. I imagine that RestKit "should" be handling the persistence to Core Data for me like it does on the GET and POST requests.