Re: Persistent store removal throwing invalidated NSManagedObject exceptions
Re: Persistent store removal throwing invalidated NSManagedObject exceptions
- Subject: Re: Persistent store removal throwing invalidated NSManagedObject exceptions
- From: Jonathan Dann <email@hidden>
- Date: Wed, 1 Apr 2009 21:52:52 +0200
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 accessor for good measure:
-(void)removeCollectionsObject:(KnowledgeCollection *)anObject {
NSSet *removedObjects = [[NSSet alloc] initWithObjects:&anObject
count:1];
[self willChangeValueForKey:@"collections"
withSetMutation:NSKeyValueMinusSetMutation
usingObjects:removedObjects];
[[self primitiveValueForKey:@"collections"]
removeObject:anObject];
[self didChangeValueForKey:@"collections"
withSetMutation:NSKeyValueMinusSetMutation
usingObjects:removedObjects];
[removedObjects release];
}
Drew
Have you tried declaring your own -primitiveCollections and -
setPrimitiveCollections: methods like in the example code (not that
I'm sure that's the issue at all.
Can you post more of your model so I can get the bigger picture,
please? Particularly how the CollectionGroup managed object fits in.
Jonathan
http://espresso-served-here.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden