Hi,
hibernate 3.0 (DB oracle 9i),
we are working on a requirement that every class below a particular class in the hierarchy must be collapsed into one table.
For this I am trying to use discriminator with union subclass
Suppose in model, class B inherits from class A and class C inherits from B.
I want to create tables only for A and B. Table for B should have all the columns of A as well. (avoiding join for performance reason).
In this case the mapping for B should be union-subclass of A. For C it should be subclass of B with discriminator. Mapping file should be like this.
<class name = "A" table="A">
...
<union-subclass ="B" table="B" discriminator-value = "b">
<discriminator column="value_type" type="string" />
...
<sub-class name="C" discriminator-value="c">
..
</subclass>
</union-subclass>
</class>
I am getting a mapping error. Hibernate doesn't allow me to do such a mapping.
how do I resolve this ?
thanks
--jaideep
|