Hello,
I am about to split my application into a 'base' with (optional) 'modules'.
The base and modules will persist classes using hibernate.
Most of these classes in the modules are specific to that module.
But sometimes the module will have to extend a persistent class
of the 'base'.
For instance :
I have a base-class "Article".
The module "Lot-tracking" will extend this Article with the
property "LotNumber" (and several others).
So "Article" will get an extra property when the module "Lot-tracking"
is activated.
So I'm looking for a way to 'expand' to a hmb.xml-file.
I now I can do it with ant and an xslt-transformation, but I would
like to see it as a standard feature in hibernate.
Maybe mark the expansion with an attribute.
maybe something like :
The Article in the 'base' :
Code:
<hibernate-mapping>
<class name="Article" table="Article">
<property name="Code"/>
<property name="Name"/>
</class>
</hibernate-mapping>
Expanding the Article in module 'Lot-tracking' :
Code:
<hibernate-mapping>
<class name="Article" table="Article" expand="true">
<property name="LotNumber"/>
</class>
</hibernate-mapping>
Any thoughts on this ?
Kees Kuip.