// HSEOUtilities // Created by caffeine@rivers on 1999-11-28 // match a given array of values on a to-many key. #import "HSEOUtilities.h" #import #import @implementation EOEditingContext (HSEOUtilities) - (NSArray *)objectsMatchingAllValues: (NSArray *)values // match ALL of these values forKey: (NSString *)key // for this key entityNamed: (NSString *)entityName // on this entity { int i=0, numMatches=0; int valueCount=[values count]; EOQualifier *andQualif; NSMutableArray *qualifiers = [NSMutableArray array]; NSArray *matches; // trigger a fetch on the first value matches = [self objectsMatchingValue:[values objectAtIndex:0] forKey:key entityNamed:entityName]; for( i=1; i= minMatches ) { [returnArray addObject:[matches objectAtIndex:i]]; } } return returnArray; } - (void)invalidateObjectsOfClass:(Class)aClass { int c=[[self registeredObjects] count]; int i=0; NSMutableArray *objectsToInvalidate = [NSMutableArray array]; for( i=0; i