If you have an iOS app, using Core Data, and backed by Sqlite, how do you prefer to manage the dirty state of your data?
It looks like Core Data NSManagedObject has a 'hasChanges' method,
and as best I can tell, it looks like sqlite has nothing for managing dirty state.
At this point I'm leaning toward using variable(s) in my own classes to flag data as dirty, because I want to guarantee that if someone changes a field from 'Apple' to 'Orange' and then later comes back and changes it to 'Apple' again, that it absolutely NOT be flagged as dirty at that point, because it's returned to the original value it had when the app started. I'm guessing managing it myself is the way to go ?
Aucun commentaire:
Enregistrer un commentaire