Hibernate version:
2.1.2
I have a class with several inverse relationships (one-to-many).
<set
lazy="true"
inverse="true"
update="true"
insert="true">
<key column="someColumn"/>
<one-to-many class="org.example.Relationship"/>
[Entity] 1 ----> n [org.example.Relationship]
It seems that I cannot have additional inverse relationships for the same column, even if they're mapped with insert=false, update=false and use a subtype of the class used to map the example above:
<set
lazy="true"
inverse="true"
update="false"
insert="false">
<key column="someColumn"/>
<one-to-many class="org.example.SpecialRelationship"/>
[Entity] 1 ----> n [org.example.SpecialRelationship]
in this case I only want to fetch objects of type "SpecialRelationship".
The generated selected ignores the type information and fetches objects of all classes , resulting in WrongClassExceptions.
is this kind of mapping possible in hibernate 2 ??
thanks,
Jan
|