NSPredicate SUBQUERY results in: [NSMutableSet uni

2019-08-07 17:22发布

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条回答
姐就是有狂的资本
2楼-- · 2019-08-07 18:05

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.

查看更多
登录 后发表回答