Hello,
I would like to use Hibernate. Currently, I use dods to map my java and my DB. But, we wish to evolve our platform.
Is it possible to create a "generic" class "linked" with several tables.
A strategy "Table per concrete class" (documentation section 9.1.5.) could correspond to our waiting. But in this case, we are required to create the corresponding subclasses ?
For example:
<class name="Entry" abstract="true">
<id name="id" type="long" column="ENTRY_ID">
<generator class="sequence"/>
</id>
<property name="description" column="DESCRIPTION"/>
<property name="description" column="CONTEXT"/>
...
<union-subclass name="EntryFra" table="ENTRY_FRA">
</union-subclass>
<union-subclass name="EntryEng" table="ENTRY_ENG">
</union-subclass>
<union-subclass name="EntryIta" table="ENTRY_ITA">
</union-subclass>
</class>
Is it possible to create only the class Entry without creating the classes EntryFra, EntryEng et EntryIta ? and load easily Entry objects into tables ENTRY_FRA, ENTRY_ENG and ENTRY_ITA !
Thx,
Fbrunet
|