Persistent store removal throwing invalidated NSManagedObject exceptions

2009-04-01 Thread Drew McCormack
I've setup a temporary managed object context to export data to an external XML file (persistent store). When I remove the persistent store from the context, I am getting errors like this: Exception raised during posting of notification. Ignored. exception: 'The NSManagedObject with

Re: Persistent store removal throwing invalidated NSManagedObject exceptions

2009-04-01 Thread Jonathan Dann
On 1 Apr 2009, at 11:20, Drew McCormack wrote: I've setup a temporary managed object context to export data to an external XML file (persistent store). When I remove the persistent store from the context, I am getting errors like this: [...] This has been included to remove the object

Re: Persistent store removal throwing invalidated NSManagedObject exceptions

2009-04-01 Thread Drew McCormack
Hi Drew, When writing a custom to-many accessor in an NSManagedObject subclass, you need to invoke the correct KVO -will/didChange methods These are: -[NSManagedObject willChangeValueForKey:withSetMutation:usingObjects:] -[NSManagedObject didChangeValueForKey:withSetMutation:usingObjects:]

Re: Persistent store removal throwing invalidated NSManagedObject exceptions

2009-04-01 Thread Jonathan Dann
Thanks Jonathan. You're absolutely right. However, when I made the appropriate changes, I have the same issue: with my new custom remove... accessor, I get the exception, and without the custom accessor, there is no exception. So something strange is still going on. Here is the new