Ok here goes my situation:
I have a core-data generated class Quantity which has one of its attributes 'Value', marked as a float.
There's a convenience method in the Quantity class which helps me set this property:
- (void)setValueValue:(float)value_ {
[self setValue:[NSNumber numberWithFloat:value_]];
}
Now when I set try set this value from a Controller like this,
Quantity *q = (Quantity *) [NSEntityDescription insertNewObjectForEntityForName:@"Quantity" inManagedObjectContext:self.managedObjectContext];
float qv = 100.0f;
[q setValueValue:qv];
the value gets set as 1.40129846e-43
I put breakpoints in both locations above, and while the tooltip correctly shows the value as 100.0 in the Controller class, it shows the incorrect value in the setter method.
And ultimately, the value that gets stored in the object and the db is the incorrect value.
Any clues as to what's happening here??