Re: Why is it wrong to have relationships without an inverse in Core Data?
Re: Why is it wrong to have relationships without an inverse in Core Data?
- Subject: Re: Why is it wrong to have relationships without an inverse in Core Data?
- From: Luther Baker <email@hidden>
- Date: Wed, 26 Jun 2013 00:57:11 -0500
At the risk of sounding like an idiot for stating the obvious ... why not
create a (dummy) inverse relationship (Child.activeParent)? No one says you
have to use it ... or heck, maybe you want to use it.
Parent.children <-------->> Child.parent
Parent.activeChild <---------> Child.activeParent
I just tested this and it works as expected. IE: setting Parent.activeChild
to different children between saves cleans up both ends of the relationship
automatically (each subsequent child's 'activeParent' field was
automatically cleared when I set a different child to the
Parent.activeChild property).
I don't know, maybe I missed something.
-Luther
On Mon, Jun 24, 2013 at 9:20 PM, Alex Zavatone <email@hidden> wrote:
>
> On Jun 24, 2013, at 8:52 PM, Graham Cox wrote:
>
> > Grocers (or should that be Grocer's?) are the only profession allowed to
> use an apostrophe to indicate that there's an 's' about to come up at the
> end of the word.
>
> That's not even a valid excuse.
> _______________________________________________
>
> 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
>
_______________________________________________
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