I have a Core Data object graph set up such that
Grandparent--(hasMany)-->>Parent--(hasMany)-->>Child
and each entity has a 'modified' property. I’d like to perform a fetch that returns each Grandparent entity with a modified date after a certain date. This should contain all Parent entities with the modified date after that point, and the same with the Child entity.
I can easily grab the list of Grandparents using
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"modified > %@", lastSyncDate];
Is there any way to write a predicate so that I can filter its relationships in the same way? Thanks!
I ended up just grabbing my whole object graph and filtering the relationships using
It’s not terribly efficient but it seems to do the trick.