开发者

Core Data fetch by property count

开发者 https://www.devze.com 2023-02-19 21:29 出处:网络
I\'m trying to fetch just objects that has a nsset inside bigger then 0 in core data Something lik开发者_高级运维e

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

精彩评论

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

关注公众号