0

All the mapping of objects within a response object to objects in my data model is clear how to do and works well. However I need to update certain properties on the data model every time values change through mapping, which are not part of the response objects. For example last_synced date or section sorting property (which is a value based on one of the mapped objects), etc.

Is there a way to set this up as part of the mapping operation or do I need to handle such things manually within the success block by iterating through the mappingResult?

Michael Loistl
  • 271
  • 3
  • 10

1 Answers1

0

Look at using KVO and the facilities offered by NSManagedObject rather than trying to use RestKit. You can trigger dependent KVC changes as the mapping applies changes to the model objects to perform your internal data updates.

Wain
  • 118,658
  • 15
  • 128
  • 151
  • Moved already away from restKit as it is much to complex to solve simple tasks. Using AFNetworking with my own convenience methods makes life so much easier and works like a charm. Was just curious if there was a simple way of doing it with RestKit. But looks like not :-( – Michael Loistl Apr 23 '13 at 07:27