MTLManagedObjectAdapter icon indicating copy to clipboard operation
MTLManagedObjectAdapter copied to clipboard

Core Data Hierarchy

Open andrewjburnett opened this issue 9 years ago • 0 comments

I have a single APIImage class which inherits from MTLObject. I would like this class to implement the MTLManagedObjectSerializing protocol but I've run into a bit of a snag. My problem is that I have three distinct Image Entities implemented in Core Data all of which could potentially be created from the APIImage class. It seems as though MTLMangedObjectAdapter requires any class which implements the MTLManagedObjectSerializer protocol to define a unique Core Data entity name to which it will be mapped. Any suggestions? Even if I were to implement a hierarchy on the Core Data side (aka a single ImageEntity with three subentities) I don't believe I would be able to map the APIImage objects to their corresponding Core Data Entity class. Is this correct?

andrewjburnett avatar Jul 08 '15 19:07 andrewjburnett