Reference to entity name in NSPredicate?
Reference to entity name in NSPredicate?
- Subject: Reference to entity name in NSPredicate?
- From: Z Rosen <email@hidden>
- Date: Tue, 15 Nov 2005 15:07:58 -0800
I have three entities (red_folder, green_folder and blue_folder) that
all descend from a single parent entity (folder).
I have a NSArrayController (allMyFolders) who's entity is set to
'folder'. It lists all of the red_ green_ and blue_ folders.
All is good.
Now, say I want to exclude the blue_ folders. It would be nice if I
could just say:
NSPredicate *blueFolderPredicate = [ NSPredicate
predicateWithFormat:@"entity.name LIKE %@", @"blue_folder" ];
[ allMyFolders setFetchPredicate:[ NSCompoundPredicate
notPredicateWithSubpredicate:blueFolderPredicate ] ];
... but (of course) entity is not a valid key.
Any ideas?
-Z
_______________________________________________
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