Trouble using ANY operator in an NSArrayController search predicate
Trouble using ANY operator in an NSArrayController search predicate
- Subject: Trouble using ANY operator in an NSArrayController search predicate
- From: Jim Correia <email@hidden>
- Date: Fri, 19 May 2006 11:19:55 -0400
Assuming the following entities
Course
name
students
Student
name
courses
and the automatically generated UI in IB.
I've added an additional predicate to the search field
ANY courses.name CONTAINS[cd] $value
A predicate of this form works correctly[1] when executed directly
against a MOC. However, when the search field applies it as the
filterPredicate, the following exception is raised.
The left hand side for an ALL or ANY operator must be either an
NSArray or an NSSet.
#0 0x90a4c4d8 in objc_exception_throw
#1 0x92adecec in -[NSPredicateOperator
performOperationUsingObject:andObject:]
#2 0x92adae08 in -[NSComparisonPredicate
evaluateWithObject:variableBindings:]
#3 0x92adc37c in -[NSPredicate evaluateWithObject:]
What am I doing wrong?
How do I filter by "student is enrolled in one or more courses whose
name contains "physics"?
Thanks,
Jim
[1] Subject to the constraints of a bug which isn't relevant here.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden