The issue is (IMHO) that self._rowValuesInDatabase[fieldName] yields for BLOB columns the unserialized NSData object. If however an entity chooses to deserialize this to e.g. UIImage the deserialization was not applied when reverting all unsaved changes. The method revertUnsavedChangeToFieldName: did so correctly. The following change simply calls revertUnsavedChangeToFieldName: for all unsaved columns in revertUnsavedChanges.
The issue is (IMHO) that
self._rowValuesInDatabase[fieldName]
yields forBLOB
columns the unserializedNSData
object. If however an entity chooses to deserialize this to e.g.UIImage
the deserialization was not applied when reverting all unsaved changes. The methodrevertUnsavedChangeToFieldName:
did so correctly. The following change simply callsrevertUnsavedChangeToFieldName:
for all unsaved columns inrevertUnsavedChanges
.