When I log the test fetch results:
NSArray *testFetchResults = [managedObjectContext
fetchObjectsForEntityName:@"Owner" withPredicate:[NSString
stringWithFormat:@"ANY books.name like 'myPrefix*'"]];
NSLog([[(Owner *)[testFetchResults objectAtIndex:0] books]
valueForKey:@"name"]);
I get the follo
I think I found a solution:
NSArray *testFetchResults = [managedObjectContext
fetchObjectsForEntityName:@"Owner" withPredicate:[NSString
stringWithFormat:@"ANY books.name beginswith 'myPrefix'"]];
NSSet *filteredSet = [(NSSet *)[(Owner *)[testFetchResults
objectAtIndex:0] buckets] filtere
Hi Melissa,
Thanks for the name change suggestion.
When I log the test fetch results:
NSArray *testFetchResults = [managedObjectContext
fetchObjectsForEntityName:@"Owner" withPredicate:[NSString
stringWithFormat:@"ANY books.name like 'myPrefix*'"]];
NSLog([[(Owner *)[testFetchResults object
On Sep 8, 2009, at 18:03, Alex Reynolds wrote:
Relationship fault for (),
name Book, isOptional 1, isTransient 0, entity Owner,
renamingIdentifier Book, validation predicates (
), warnings (
), versionHashModifier (null), destination entity Book,
inverseRelationship Owner, minCount 0, max
I am having trouble fetching results with a to-many relationship and
would like to ask for advice.
I have two NSManagedObject subclasses: Owner and Book. There is a one-
to-many relationship between Owner and Book (an Owner can be
associated with many Books).
@interface Owner : N