I have an entity with some values in my coreData.
cTitle (string) and price (float)
for example:
cTitle (milk, bread, beer)
price (30, 20, 15);
I need to get values which price is < 20
I’m trying to set predicate
NSNumber *pr = [NSNumber numberWithFloat: 20.0];
NSPredicate *predicate = [NSPredicate predicateWithFormat: @"cPrice > %@)", pr];
[fetchRequest setPredicate:predicate];
But it crashes with error
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse the format string "cPrice > %@)"'
It is single entity, without relationships.
Whats wrong? I can’t understand.
remove
)near%@)":