I have a basic understanding of predicates, but am stuck with this.
I have 2 Core Data Objects:
Car and Service
Each have a odometer property that is a NSString
.
I want to exclude certain results by comparing the odometer readings of both. I want to compare as a Int
, not as a NSString
.
This will not work, but it should detail what I am trying to do
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"(%i > [serviceOdometer intValue])", [self.currentCar.odometer intValue]];
I have the current Car as an Int, but cannot get the fetched Service odometer as an int.