0
xml引用了一些地方,我的錯誤是The content of class tag must match ....
因此我不能在class
標記中使用連接。在hibernate映射文件`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>
代碼在其他地方被引用。