Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 7, 2009, 09:10 AM   #1
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Using ANY with multiple tests on a single object in an NSPredicate

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.

Last edited by Eraserhead; Jun 7, 2009 at 09:22 AM. Reason: Merge
Eraserhead is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Multiple Names for a single iPhone contact? razzydazzle99 iPhone 6 Feb 11, 2013 07:48 AM
Multiple choice tests, program for creating? Kyle12 Mac Applications and Mac App Store 0 Dec 10, 2012 07:08 PM
SuperDuper copy single/multiple folders only? Orlandoech Mac Applications and Mac App Store 1 Aug 17, 2012 02:50 AM
Multiple OSs on a single USB Drive Achiever OS X 10.8 Mountain Lion 12 Aug 2, 2012 02:37 PM
MAS - Using a single update for multiple computers laserbeam273 Mac Applications and Mac App Store 4 Jul 2, 2012 05:37 PM

Forum Jump

All times are GMT -5. The time now is 01:12 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC