Hibernate version 3.0 RC
After reading the Reference manual and the H3 DTD I do not quite understand the following limitation in Hibernate 3:
The DTD does not allow to extend a union-subclass with a subclass element.
What we want to achieve is to map the following class hierarchy:
Code:
(abstract)
Top
/ \
/ \
(abstract) (abstract)
Middle1 Midlle2
/ \ / \
Base1a Base1b Base2a Base2b
The Middle1 and Middle2 hierarchies should both be mapped with table-per-class-hierarchy mappings, e.g. one table for Middle1 and it's subclasses and one table for Middle2 and it's subclasses.
So we thought this mapping should work:
Code:
<class name="Top" abstract="true">
...
<union-subclass name="Middle1" abstract="true">
<subclass name="Base1a">
...
<subclass name="Base1b">
...
<union-subclass name="Middle2" abstract="true">
<subclass name="Base2a">
...
<subclass name="Base2b">
....
As said above the DTD does not allow this. So we want to know if there is another way to express our mapping?
Or is this limitation a bug in the DTD?
Thanks, Olli