I'm new to Core Data, and am not sure how to reconcile the need to inherit from NSManagedObject with the fact that my model is a Swift struct composed of structs. I chose to make my a model value type so that it would be simple to push and pop it onto an undo stack. But since a value type can't inherit, I'm unsure as to where to go next in order to save my model to the database. Should I turn my model into a class and use UndoManager instead? What might be some other possible approaches?
Persisting a model that is a struct containing structs in Core Data
Add a Comment