- Assuming a Department entity and an Employee entity with a one-many relationship
- Assuming relationship called employees on Department and department on Employee
- Assuming Employee has an attribute name
I need to fetch all Departments that don't have an Employee called "Bob"
Based on other answers on SO that I've read, I've tried this:
name = @"Bob";
predicate = [NSPredicate predicateWithFormat:@"ALL employees.name != %@", name];
but it doesn't seem to work. Any ideas?
Thanks.