Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performing operations on objects within nested contexts where the MR_…
…inContext: method was used was throwing errors when objects with tempID's were being passed to the method. The solution was to check if the ID is temporary and then if it is, request a permanentID before continuing.
- Loading branch information
80774c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oopps! The existing line wasn't updated to use the new variable "objectID". It should also be updated to look like:
NSManagedObject *inContext = [otherContext existingObjectWithID:objectID error:&error];
The code still works even without the change since the [self objectID] will now pull a perm id, but for accuracy it should be changed. Thanks.