I'm trying select values by property with type NSNumber, if property==intValue or property==nil. But this code ignores values with property==nil. What the point?
NSPredicate *predicate = [NSPredicate predicateWithFormat:
@"(ANY region.beacons.major == %d OR ANY region.beacons.major = nil)
AND (ANY region.beacons.minor == %d OR ANY region.beacons.minor = nil)",
rangedBeacon.major.intValue, rangedBeacon.minor.intValue];
UPD: The most simple doesn't work too:
NSPredicate *predicate = [NSPredicate predicateWithFormat:
@"ANY region.beacons.minor = nil"];
UPD 2: Probably problem because of ANY+nil According to this answer Core Data, NSPredicate, ANY key.path == nil ANY select only NOTNULL values.