hi all, i got a complicate mapping, i think it suppose to work...but why it compile A.d column is not existed???
public abstract Class A {
private Integer Id;
..
...
}
public Class SubA extend A {
private D d;
}
public Class D {
private SubA subA;
}
A.hbm.xml
<class name="A" table="A" abstract="true"/>
...
<subclass
name="SubA"
discriminator-value="SUB_A"
lazy="false"
>
<join table="TABLE_SUB_A">
<key column="ID"/>
<many-to-one name="d"
column="COL_D"
class="D"
cascade="NONE"
outer-join="true"
unique="true"/>
</join>
</subclass>
</class>
D.hbm.xml
<one-to-one name="subA"
class="SubA"
property-ref="d"/>