Re: Reference to entity name in NSPredicate?
Re: Reference to entity name in NSPredicate?
- Subject: Re: Reference to entity name in NSPredicate?
- From: The Karl Adam <email@hidden>
- Date: Tue, 15 Nov 2005 19:13:47 -0500
[NSPredicate predicateWithFormat:@"entity.name == \"blue_folder\""];
On 11/15/05, Z Rosen <email@hidden> wrote:
> Is there any way to do it without adding additional data?
>
> If the blue_folder entity has a key 'blue_data', can the predicate
> exclude objects that have a blue_data key (without throwing an
> exception, obviously). In short, can a predicate check if a key exists?
>
> As a last resport, would it be insane to override -[NSArrayController
> fetchWithRequest:merge:error] to search each child entity
> individually and merge the results?
>
> -Z
>
>
>
> On Nov 15, 2005, at 3:35 PM, Scott Stevenson wrote:
>
> >
> > On Nov 15, 2005, at 3:07 PM, Z Rosen wrote:
> >
> >> 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?
> >
> > Create an attribute that describes the type of each instance.
> >
> >
> > - Scott
> >
> > --
> > http://theocacao.com/
> >
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Cocoa-dev mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> > 40reelintelligence.com
> >
> > This email sent to email@hidden
>
> _______________________________________________
> 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
>
_______________________________________________
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