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

查看:37
本文介绍了NSPredicate SUBQUERY 导致:[NSMutableSet unionSet] set argument is not an NSSet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一组艺术家中,我尝试使用以下格式执行 filteredArrayUsingPredicate,以仅保留至少拥有一张专辑且至少包含一首介绍歌曲的艺术家.

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 是艺术家与专辑之间的多对多关系.intros 是从 Album 到 Intro 的多对多关系.我得到一个异常说 [NSMutableSet unionSet:]: set argument is not an 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"

推荐答案

apples Core-data 框架中似乎存在/曾经存在错误.我确认这一点,因为我不再遇到这个问题.我根本没有解决它.我试过了,这减少了异常的频率,但并没有消除它.

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 argument is not an NSSet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆