Hi,
given:
Code:
public interface A {}
public interface B {}
public class X implements A, B {}
how can i map class X that implements interfaces A and B?
i tried with:
Code:
<class name="A">
...
<joined-subclass name="X">
<key column="A_ID"/>
</joined-subclass>
...
</class>
<class name="B">
...
<joined-subclass name="X">
<key column="B_ID"/>
</joined-subclass>
...
</class>
but hibernate complains with a
DuplicateMappingException for class X.
what i want (something almost normal, i thing) is a polymorphic association to any object implementing A and/or B.
(btw, the original option was annotations, is this possible with jpa + hibernate annotations?)
thanks.