Reputation: 131
Lets say we have two entities Department and Employees with a one-to-many relationship.
How do I fetch all employees who are not part of a selected Department?
Upvotes: 1
Views: 37
Reputation: 124997
Create a fetch request for the Employee entity and add a predicate that says "self.department NOT like %@", passing in the selected department as the parameter.
Upvotes: 2