Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从一个没有相关对象的实体中获取所有对象(使用特定的键路径)我正在考虑使用计数,但不知道如何实现这一点。
如果是 1:1 关系,请尝试以下搜索谓词:
[NSPredicate predicateWithFormat:@"relationshipName = NULL"];
对于 1:n 关系:
[NSPredicate predicateWithFormat:@"relationshipName.@count == 0"]