hello,
is it possible for joined-subclass (subclass per table strategy) to contain a subclass?
The outline of my problem is that I have three classes, A, B and C. C extends B and B enxtends A. My tables are T_A and T_B. I'm trying to do the following:
Code:
<class table="T_A" name="A">
<id name="id" type="long" unsaved-value="0">
<column name="RID" sql-type="integer"/>
<generator class="native"/>
</id>
<joined-subclass table="T_B" name="B" discriminator-value="0">
<key column="ID"/>
<discriminator type="integer" column="DESCRIMINATOR"/>
<subclass name="C" discriminator-value="1">...</subclass>
</joined-subclass>
</class>
And the parser complains:
org.xml.sax.SAXParseException: The content of element type "joined-subclass" must match "(meta*,key,(property|many-to-one|one-to-one|component|dynabean|any|map|set|list|bag|idbag|array|primitive-array)*,joined-subclass*)"
It seems that it is invalid to put a <suclass> inside a <joined-subclass> according to the DTD, but I can't see why hibernate would not support this.
Is it really a non-feature?
Thanks,
Stathis