• 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: Predicate for an empty set?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Predicate for an empty set?


  • Subject: Re: Predicate for an empty set?
  • From: mmalc crawford <email@hidden>
  • Date: Sun, 19 Aug 2007 00:40:32 -0700


On Aug 18, 2007, at 5:43 AM, Conor wrote:

I am having trouble given that employee is a to-many relationship. I have
the opposite working all department with at least one employee:
[NSPredicate predicateWithFormat:@"ANY employee.name != nil"];
But I can't do "employee == nil" on a to-many relationship; the NOT of the
opposite also fails "NOT ANY employee.name != nil".


It's not clear why you're testing for employees' names.
You should be testing the 'count' of the relationship.

mmalc

_______________________________________________

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


References: 
 >Predicate for an empty set? (From: Conor <email@hidden>)

  • Prev by Date: Re: Problem with NSMutableDictionary
  • Next by Date: Control memory overhead : how releasing custom NSMannagedObject ?
  • Previous by thread: Predicate for an empty set?
  • Next by thread: Strange _originalSnapshot error
  • Index(es):
    • Date
    • Thread