开发者

Core Data fetch by property count

I'm trying to fetch just objects that has a nsset inside bigger then 0 in core data Something lik开发者_高级运维e

fetch all objects that object.set > 0

Does anyone know if this is possible?

Thanks


I was able to find a way that works:

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"set.@count > 0"];

If there's a better way, please let me know, I'm posting here to help anyone that has the same problem.

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜