I am trying to set up RestKit to delete orphaned objects that don't exist on the server but still exist in the local cache, using NSFetchRequests as described in the documentation for RKManagedObjectRequestOperation.
If I have a call that returns multiple collections of different object types, each of which are mapped using keys, is RestKit smart enough to deal with this? Or will it only work on calls that return objects of a single type? For example:
URL: /users?accessToken=someToken
Response:
{
users: [],
collection1: [],
collection2: [],
collection3: []
}
The type of object stored in each collection is a different Entity in my data model. How can I write an NSFetchRequest that will allow me to delete objects from the local cache that are no longer in collection1, collection2, or collection3?