Hibernate version:
3.0.5
Mapping documents:
<class
name="ru.vgroup.smt.domain.Conclusion"
lazy="false"
>
<id
name="conclusion_id"
column="conclusion_id"
type="int"
access="field"
>
<generator class="native">
</generator>
</id>
<one-to-one
name="logicalRule"
class="ru.vgroup.smt.domain.LogicalRule"
cascade="all"
outer-join="false"
constrained="false"
access="field"
property-ref="conclusion"
/>
<union-subclass
name="ru.vgroup.smt.domain.RelationConclusion"
table="relation_conclusion"
extends="ru.vgroup.smt.domain.Conclusion"
lazy = "false">
...
</union-subclass>
<union-subclass
name="ru.vgroup.smt.domain.SetAttributeConclusion"
table="set_attribute_conclusion"
extends="ru.vgroup.smt.domain.Conclusion"
lazy = "false">
...
</union-subclass>
</class>
Hibernate generate sql query with UNIONs, where it tries to select from 3! tables include super-class table. Save and Delete use concrete tables, but get/load and HQL needs super-class table. If i have empty table "Conclusion" all is fine. Hibernate doesn't need information from this table, but table must exist.
And why hibernate look for "Conclusion" table? I thought this property obligatory and can not be generated from class name.
|