magicalpanda/MagicalRecord — Issue #115: Problem moving from old(er) version of MR to current versions...
Author: awmwong
Created: 2011-12-19 21:11:22+00:00
State: open

The current version of my application used an older version of MR (don't know the exact revision, but it was the pre MR_ prefix days),

All over the application I have code that used to look like this:

NSManagedObjectContext* context = [NSManagedObjectContext context];
[context setNotifiesMainContextOnSave:YES];

that sits in a background operation. Upon updating to the current version of MR, I went through and updated everything to look like this...

NSManagedObjectContext* context = [NSManagedObjectContext MR_context];
[context MR_setNotifiesMainContextOnSave:YES];

but now I'm getting an

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Context already has a coordinator; cannot replace.'

when the setter is being called.

What has changed?