Re: Core Data : User missing inverse relationship despite model settings
Re: Core Data : User missing inverse relationship despite model settings
- Subject: Re: Core Data : User missing inverse relationship despite model settings
- From: Jerry Krinock <email@hidden>
- Date: Mon, 08 Aug 2011 12:35:50 -0700
On 2011 Aug 08, at 09:43, Sean McBride wrote:
> Despite knowing that well (after learning it the hard way long ago), I found another place where I do so. But not in a direct way! A controller object is using KVO to observe many things. Sometimes in response to these changes, it ends of firing a fault, which leads to more KVO, etc.
Yes, I probably have a lot of that going on too.
> Suffice to say that I ended up with awakeFromFetch in the backtrace (30 frames ago) and then changed a relationship.
I want to make sure this is not harder than I think.
My Foo class has not overridden -awakeFromFetch.
My Bar class does this…
- (void)awakeFromFetch
{
[super awakeFromFetch] ;
NSDictionary* exids = [[self localStoreManager] exidsForBar:self] ;
[self setIvarExids:exids] ;
}
-localStoreManager is an object which accesses a "local" persistent store, which it identifies per the Bar object's -managedObjectContext. Thus, we get 'exids' from this other store and cache it in ivarExids which is, as the name implies, a regular instance variable.
With this, I conclude that I am clean as far as not setting relationships in -awakeFromFetch. Are there other back doors which I haven't checked?
Jerry_______________________________________________
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