Closed makdad closed 12 years ago
By the way, is there a need for the DELETE route to have a separate sync implementation? I was confused by:
case RKSyncStatusPut: [_objectManager putObject:[context objectWithID:itemID] delegate:self]; break; case RKSyncStatusDelete: [[_objectManager client] delete:item.objectRoute delegate:self];
Maybe there's something I'm not getting about RestKit (likely, just started using it last month).
Why isn't this just deleteObject: like the others?
Yes, there's a reason for the different implementation for delete requests.
Once an object is deleted from the managedobjectcontext, it's no longer available to use for finding out which route to use (remember routes can be based on the object itself, like including a uid or something). So for deleted objects, instead of saving a pointer to the object like we do for the others, we just store the route instead.
There's an argument to made for storing the route on all of them, I think.