Hello !
Hibernate version: 3.0 final
I've a problem with inheritance mapping and many-to-one association.
Here is the inheritance diagram :
Code:
<== IntegerValue
AbstractValue
<== TextValue
Mapping strategy : table per class hierarchy (joined-subclass).
If I use session.createQuery(...), I got the correct class (that's to say IntegerValue or TextValue ). So the mapping seems to be correct.
Meanwhile, this mapping is used in a "many-to-one association" :
Code:
1..n
Attribute -------- AbstractValue
Mapping for Attribute :
Code:
<many-to-one
name="IdAbstractValue"
class="AbstractValue"
not-null="true"
cascade="save-update"
>
<column name="id_value"/>
</many-to-one>
If I load an Attribute, I got an AbstractValue and not one of its child class...
An idea ??
Thanks