Re: Predicate for an empty set?
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