NSPredicate SUBQUERY导致:[NSMutableSet unionSet] set参数不是NSSet [英] NSPredicate SUBQUERY results in: [NSMutableSet unionSet] set argument is not an NSSet
问题描述
在一系列歌手中,我尝试使用以下格式执行 filteredArrayUsingPredicate
,以便仅留给拥有至少一个专辑且至少包含一首Intro歌曲的歌手。
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.
相册
是从歌手到专辑的多对多关系。 intros
是一个从专辑到简介的多对多关系。我得到一个异常,说 [NSMutableSet unionSet:]:set参数不是NSSet
。我究竟做错了什么?这是上述谓词格式:
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"
推荐答案
似乎/是苹果核心数据框架中的错误。我确认这一点是因为我不再遇到此问题。我根本没有解决。我试过了,这样可以减少例外发生的频率,但没有消除它。
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.
这篇关于NSPredicate SUBQUERY导致:[NSMutableSet unionSet] set参数不是NSSet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!