Re: Core Data: right way to gather all elements of a to-many relationship?
Re: Core Data: right way to gather all elements of a to-many relationship?
- Subject: Re: Core Data: right way to gather all elements of a to-many relationship?
- From: "I. Savant" <email@hidden>
- Date: Wed, 11 Feb 2009 19:13:23 -0500
On Feb 11, 2009, at 5:38 PM, Luke Evans wrote:
Clearly, you wouldn't even notice the switcheroo if you were driving
the relationship via a more generic collection-like interface (e.g.
like using -count, using fast enumeration or other things that apply
equally well to a range of concrete collection objects - or at least
arrays and sets).
Well, I'd say that, rather than the odd work-around you're using
now, you should use KVC.
[[self valueForKeyPath:@"parent.elements"] allObjects]
... this should do the same thing with the expected result. If it
does not, there is another problem with your code.
--
I.S.
_______________________________________________
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