Core data subquery predicate
I'm trying to get a subquery predicate to work and I'm struggling. I have two entities. [League] <---->> [Game] Game has a property kickOffDate . I'd like to use a predicate to return all Leagues that have at least one Game with a kickOffDate today. I am using this predicate... // startOfDay and endOfDay are functions to return the given date with 00:00:00 and 23:59:59 respectively NSPredicate *startOfDayPredicate = [NSPredicate predicateWithFormat:@"SUBQUERY(games, $g, $g.kickOffDate >= %@).@count > 0", [self startOfDay:[NSDate date]]]; NSPredicate *endOfDayPredicate = [NSPredicate