ustwo/US2MapperKit

Implement ability to apply inheritance for the generated base class

Opened this issue · 0 comments

Currently there is no way of inheriting from a base class when using other frameworks.

Examples include:

  • Inheriting from Object when using Realm
  • Inheriting from NSManagedObject when using core data.

A nice feature would be to be able to define, as part of the model mapping, the class that the base class is generated by US2MapperKit, and configure the ability to import custom libraries as part of the model generation.

A possible issue that this could break in US2MapperKit is the ability to define non-optional values, as some frameworks may not support it (i.e) realm. Thus when applying inheritance to the base, the ability to define non-optional properties should be disabled.