pitiphong-p/AFIncrementalStore — pull request #1 by adamhowardprice (2012-12-02 01:59:41+00:00)
Title: Fix apply value from managed object to backing object

I've been using your method `applyValueFromManagedObject:toBackingManagedObject` in my project, and I came across some crashes that were happening because one of my objects related objects hadn't registered its objectID with AFIncrementalStore yet (because it was still waiting on its POST network request to finish, while its related object didn't need a PUT request, so it got processed faster).

The way I ended up solving this was by adding a check for `![[relatedObject objectID] isTemporaryID]`.

Also, there was a problem because in the method `objectIDForBackingObjectForEntity`, you were using the "entity" property of the relationship, when it should be "destinationEntity." After applying these fixes, this method has been critical in making my project work, so I thank you for it. Thought you might want to apply these fixes and re-submit your pull request to @mattt.