|
Hi, I have following problem:
Let class BasePerson represent base class of classes PersonA and PersonB. All classes needs to be mapped to single table (table-per-hierarchy), without need for discriminator, because don't want to have repeteable data in "person" table with different discriminator value.
Second, BasePerson belong to CORE component, and PersonA belongs to ProjectA and PersonB belongs to ProjectB. Core component can be tested in isolation, all queries are against "person" table through BasePerson (HQL or Criteria queries).
How to organize mappings? Is it possible to put all "basic" mappings in core component (BasePerson, BaseDocument, ...) and in mapping files for PersonA and PersonB to put just their own properties?
Thanks in advance. I hope my question is clear.
Regards.
|