Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Eraserhead

macrumors G4
Original poster
Nov 3, 2005
10,434
12,250
UK
I have an NSPredicate to process a managed object with several children objects and I want to test multiple properties of each individual child object and test whether any objects exist with both properties.

i.e. I want to make the following code parsable by NSPredicate:

Code:
 ANY subfeat CONTAINS (feat.miscUse==\"Conscious for Negative HP\" AND active == 1))
There is more stuff before the ANY so ideally I don't want to have to break the tests out into two bits - though if this can't be done I guess I'll have to do that.

Another way of looking at this problem with the "Joins" example here would be to get every employee whose name starts with Matt and with any directreport.paygrade that is less than 7 and is also directreport.important.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.