I'm using RestKit 0.20.3 with CoreData to cache the results from my web services.
I need to delete from CoreData all the objects that are not in the response so I use [RKObjectManager addFetchRequestBlock]
. Everything works fine when I do GET requests but when I do POST requests the objects are not deleted in CoreData, I think because deleteLocalObjectsMissingFromMappingResult
is done only with GET requests.
I understand that, in a RESTfull architecture, POST requests are used to update an entity on the server side but in my case the web service provides search capabilities and takes a lot of optional parameters in POST.
Is there a way to configure RestKit to do the deletion even after POST requests?
If not, do I need to perform the deletion by hand at the end of each request or is there another better way?