NSPredicate, get results with a subset of one-to-many relationship
I'mm working around with Core Data and NSFetchedResultsController . My Data Model looks like this: Product with one-to-many relationship called dataLines . The dataLine entity has a property name theWeek . I want to fetch all Product where dataLines.theWeek == someValue . This is easily done with a subquery. But this returns all dataLines. Is it possible to create a NSPredicate that returns the Product and a subset if dataLines only with the dataLines == someValue ? What you want to achieve could be reached in two ways: using a SUBQUERY [NSPredicate predicateWithFormat:@"SUBQUERY(dataLines, $x