They are noted in the NSExpression.h header with API to create them and a
comment to their functionality.
- Ben
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
Objects:
- NSManagedObject *item - some managaged object
- NSArray *attributes - an array of the item's attributes
Desired Result:
- a possibly smaller array of attribites where [item valueForKey:an
attribute] != nil.
In code, I can simply iterate over the keys, perform the valueForKey,
I can't think of a way to do this without iterating over the entire array. It
*might* be possible using key-value coding and fancy keypaths and whatnot, but
iteration is going to be far simpler to implement and understand.
Dave
On Apr 2, 2010, at 8:27 AM, David Hoerl wrote:
Objects:
-
Objects:
- NSManagedObject *item - some managaged object
- NSArray *attributes - an array of the item's attributes
Desired Result:
- a possibly smaller array of attribites where [item valueForKey:an
attribute] != nil.
In code, I can simply iterate over the keys, perform the
Having the array of attributes unrolled separately is a little odd. Do you
mean you have an array of attribute names from, say the entity, and you want to
ask a MO for all its non-nil attribute values and get back an array of matching
attribute names for those non-nil values?
- Ben
On Apr 2, 2010, at 1:30 PM, David Hoerl wrote:
Having the array of attributes unrolled separately is a little odd. Do you
mean you have an array of attribute names from, say the entity, and you want
to ask a MO for all its non-nil attribute values and get back an array of
matching
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