Table A{
id INT;
type INT;
AB_id INT;}
B extends A
Table B{
id INT;
Name String;}
C extends A
TABLE C{
id INT;
description String;}
Code:
<class name="A" table="A" discriminator-value="0">
.
.
<discriminator>
<column name="т..е" sql-type="INTEGER"/>
</discriminator>
.
.
<subclass B discriminator-value="1">
<join table="B">
<key>.....</key>
<propertie name="name" column="name"/>
</joint>
</subclass>
<subclass C discriminator-value="2">
<join table="C">
<key>.....</key>
<propertie name="description " column="description"/>
</joint>
</subclass>
</class>
As you see, this is simple inheritance but i can't find how to say that join between A and B, A and C must be via column A.ab_id = B.id and A.ab_id=C.id.
Any ideas?