NSPredicate SUBQUERY results in: [NSMutableSet unionSet] set argument is not an NSSet

a 夏天 提交于 2019-12-11 10:02:02

问题


On an array of Artists I am trying to do filteredArrayUsingPredicate using the below format to only remain with Artists that have at least one Album that has at least one Intro song.

albums is a to many relationship from Artist to Album. intros is a to many relationship from Album to Intro. I get an exception saying [NSMutableSet unionSet:]: set argument is not an NSSet. What am I doing wrong? Here is the aforementioned predicate format:

@"SUBQUERY(albums, $alb, ANY $alb.intros != NULL).@count != 0"

回答1:


It seems like there is/was a bug in apples Core-data framework. I confirm this because I do not encounter this issue anymore. I did not address it at all. I tried to, and that reduced the frequency of the exception, but did not extinguish it.

Have a look at this link for suggestions on how to solve this sort of issue.



来源:https://stackoverflow.com/questions/30992832/nspredicate-subquery-results-in-nsmutableset-unionset-set-argument-is-not-an

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!