Re: CoreData predicate programming
Re: CoreData predicate programming
- Subject: Re: CoreData predicate programming
- From: Steve Steinitz <email@hidden>
- Date: Thu, 28 Jun 2007 18:55:13 +1000
Hello Steve,
On Thursday, 28 June 2007 at 12:49 am, Steve Israelson wrote:
> I have a "Item" entity that has a to-many relationship for its
> "usages" relationship. The usage contains a list of "Usage"
> entities with a "kind" integer attribute.
> What I want to do is find all the "Item" entities that have a usage
> of more than one kind, like say 1, 2 AND 3.
If you are unable to find a pure predicate solution, you probably
already realize that you could write one or more
- (NSNumber *) hasDesiredUsageKinds
methods on your 'Item' entity, make them a Transient attributes and
then write simple predicates for those. You might even get away with
returning BOOL but I'm not sure regarding the predicates.
That back-to-the-wall technique aside, I wish you luck in finding a
purer, more versatile solution.
Steve
_______________________________________________
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