We'd like to be able to decouple modules (eg from Estatio or wherever) and make them reusable for others.
For example, Estatio has "CommunicationChannel", where its owner is of type CommunicationChannelOwner. We currently use DataNucleus' support for interface mappings, but (because we use annotations) this requires us to list the fully qualified class names of the implementations in the CommunicationChannel; hardly reusable code.
Naked Objects MVC has a service called the PolymorphicNavigator , a mechanism to handle relationships between different Entity Framework contexts, typically via an interface.
The PolymorphicNavigator requires that all implementations use an int (or long) as their primary key. It then stores the relationship in a separate table, qualified by the object type. This is a bit like DataNucleus' "identity" strategy for mapping interfaces , except that:
- two columns are used, not one (for object type, and object PK
- the link is held separately from the rest of the object's data.