在hibernate映射文件`class`标记中不允许连接标记

时间:2016-04-28 16:14:59

标签: hibernate

Xml引用了一些地方,我的错误是The content of class tag must match ....因此我无法在class标记内使用联接。

<hibernate-mapping package="beans">
<class name="TABLE1Class" table="TABLE1">
<composite-id name="table1PK" class="TABLE1PKClass">
    <key-many-to-one name="id1" class="ID1Class" column="id1"/>
    <key-many-to-one name="id2" class="ID2Class" column="id2"/>
    <key-many-to-one name="id3" class="ID3Class" column="id3"/>
</composite-id>
<property name="someProperty" type="integer" not-null="true" column="x"/>
<join table="TABLE2">
    <key column="id1" />
        <property name="propertyFromTable2" type="float" not-null="true"/>
</join>

<joined-subclass>
    some joined subclass
</joind-subclass>
  </class>
</hibernate-mapping>

代码在其他地方被引用。

1 个答案:

答案 0 :(得分:0)

  

((合并*,子类*)|接合子类* |工会子类*),

含义:join / joined-subclass / union-subclass不能混合使用。