问题
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