Re: NSPredicate/NSExpression - can they solve this Core Data problem?
Re: NSPredicate/NSExpression - can they solve this Core Data problem?
- Subject: Re: NSPredicate/NSExpression - can they solve this Core Data problem?
- From: Dave DeLong <email@hidden>
- Date: Fri, 02 Apr 2010 15:50:25 -0600
Is the use of SUBQUERY() documented anywhere? The only mention I've seen of it is in the reserved keywords section of the Predicate Format String Syntax guide.
Dave
On Apr 2, 2010, at 3:42 PM, Ben Trumbull wrote:
> NSComparisonPredicate* exprPred = (NSComparisonPredicate*)[NSPredicate predicateWithFormat:@"SUBQUERY(self, $key, %@.$key != nil) == 0", obj];
> NSExpression* expr = [exprPred leftExpression];
> NSLog(@"expression subquery results = %@", [expr expressionValueWithObject:keys context:nil]);
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden