开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜