RestKit/RestKit — pull request #975 by huesforalice (2012-10-03 20:43:09+00:00)
Title: Duplicates when refreshing data in certain setups

In certain scenarios I'm getting duplicates when refreshing data in my Restkit driven project.

This happens if I have a primaryKeyAttribute that is an integer in the JSON I pull from the server but is saved to a NSString field in a NSManagedObject. If this was a regular Attribute of the object, the conversion from Number to String would work without problem.

If I use it as the primaryKey, the caching will get confused, using a NSNumber as a Key when trying to find the object and using a NSString as Key when saving the object to the cache. This commit fixes this issue, I don't know if it breaks anything else though.