• 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
CoreData predicate programming
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData predicate programming


  • Subject: CoreData predicate programming
  • From: Steve Israelson <email@hidden>
  • Date: Wed, 27 Jun 2007 16:30:09 -0700

I have been looking at this and other docs:
http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/ Articles/pSyntax.html


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.
So, say I want all the items with a usage of 1, I can use this predicate:
ANY usages.kind = 1


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.
I could do this I think:
ANY usages.kind = 1 AND ANY usages.kind = 2 AND ANY usages.kind = 3


I would like a more general way that I can add into the string a list of usage kinds that ALL must be present for that item to be returned.
Any tips?


I suppose one day I would want one as well where any one usage type could be present too.

_______________________________________________

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: Bindings / NSTableView (limitation ?)
  • Next by Date: Re: setting up an NSTextView manually
  • Previous by thread: Re: PDFKit - CurrentPage with scale factor not in 100%
  • Next by thread: Re: CoreData predicate programming
  • Index(es):
    • Date
    • Thread