How do I fetch an object that is not part of an relationship
Lets say we have two entities Department and Employ开发者_如何学Pythonees with a one-to-many relationship.
How do I fetch all employees who are not part of a selected Department?
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.
精彩评论