I have a persistent class which I load using the Adapter pattern.
For example:
a) Proposal class is mapped and persistent
b) ProposalAdapter extends Proposal but is part of another package and not mapped. It only job is to adapt to the persistent domain model.
When I try to save the ProposalAdapter I get a "MappingException: No persister for ..." exception. It expects to see a mapping for the adapter class.
Ideally, I'd like it to save the adapter class as its base-class without having to define a <subclass/> mapping in the mapping file. I also don't have control over the database table to add a discriminator column.
I'll always retrieve it as the base class once saved.
Any ideas on if this is possible?
Thanks,
Don
|