Was tearing my hair out for a while. didn't understand what was going on. Performing a fetchRequest from my core data database I used this predicate:
And it wouldn't work, no hits at all. I was pulling out just all records and loggin them etc. I was pretty damn sure there were records in my database which should have been caught, but nope.
After some fiddling I tried:
And it worked! wtf?!
Can someone explain this one to me, why does one work and not the other. In my understanding they should be the same?
Code:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"read == NO"];
And it wouldn't work, no hits at all. I was pulling out just all records and loggin them etc. I was pretty damn sure there were records in my database which should have been caught, but nope.
After some fiddling I tried:
Code:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"read != YES"];
And it worked! wtf?!
Can someone explain this one to me, why does one work and not the other. In my understanding they should be the same?