Hi there, I have a really strange behavior in a Core Data app. This is the code:
unaReg.valore = [NSNumber numberWithInt:val];
NSError *error;
if (![managedObjectContext save:&error]) {
[myUtil manageError:[error localizedDescription]];
}
unaReg
is a Core Data Entity and I want to update its valore
property.
When I run the save
command (managedObjectContext save:&error
) I get an error since the program flows inside the if
branch. The strange behavior is that the error
variable is nil
and the new value is saved correctly inside the database (so it seems that there is not an error).
What's wrong????
Thanks.