• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreData predicate programming
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: [SOLVED] bindings with two interdependent NSPopupButtons
  • Next by Date: Subclassing NSLevelIndicatorCell
  • Previous by thread: CoreData predicate programming
  • Next by thread: crash in NSNavOutlineDelegate
  • Index(es):
    • Date
    • Thread