Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Jun 7, 2009, 09:10 AM   #1
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:

 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

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Can an Airport Express Be Used To Allow Multiple Devices on One Hotel WiFi Charge? adoland iPhone 20 Jan 5, 2011 12:23 PM
Multiple movies on a single DVD yetti12 Mac Basics and Help 2 Sep 22, 2008 09:50 AM
Multiple Album Artwork for Single Album in Cover Flow wowurrcool iPod 4 Jul 23, 2008 01:24 PM
Multiple Photos on a Single Slide qpawn Digital Photography 2 Jul 17, 2008 03:43 AM
Is there any way to modify a null object in an Array? bigrell486 Mac Programming 1 Apr 15, 2007 04:40 PM

All times are GMT -5. The time now is 01:56 PM.

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

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