It seems that βNOβ or βNOT ANYβ does not work properly in Core Data predicates. Both predicates
NONE labels.labelId == 4 NOT (ANY labels.labelId == 4)
really returns the same result as
ANY labels.labelId != 4
which is not how I understand the documentation. As a workaround, you can use SUBQUERY:
[NSPredicate predicateWithFormat:@"SUBQUERY(labels, $x, $x.labelId == 4) .@count == 0"]
source share