私のアプリケーションでは、1 つのテーブルに主キー列がありません。代理キーとして扱い、タグを使用しようとしていますが、例外が発生しました。
**"org.hibernate.MappingException: Error reading resource:
com/mapping/FamilyDetails.hbm.xml"**
**Caused by: org.xml.sax.SAXParseException:
The content of element type "class" must match "
(meta*,subselect?,cache?,synchronize*,comment?,
(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,
(property|many-to-one|one-to-one|component|dynamic-
component|properties|any|map|set|list|bag|idbag|array|
primitive-array|query-list)*,
((join*,subclass*)|joined-subclass*|union-subclass*),loader?,
sql-insert?,sql-update?,sql-delete?,filter*)".**
マッピング ファイル:-FamilyDetails.hbm.xml
<class name="com.beans.FamillyDetails"
table="personal_fmly_dtls" proxy="com.aims.beans.FamillyDetails">
<natural-id>
<property name="systemid" />
</natural-id>
<property name="membername"
type="java.lang.String" column="membername" not-null="true" />
<property name="relation"
type="java.lang.String" column="relation" not-null="true" />
<property name="dateOfBirth"
type="java.util.Date" column="dateofbirth" not-null="true" />
<many-to-one name="Personal" column="pid" class="com.aims.beans.Personal"/>
</class>
<?xml version="1.0" encoding='UTF-8'?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class name="com.aims.beans.Personal"
table="personalinfo" proxy="com.aims.beans.Personal">
<id name="pid" column="pid" type="java.lang.Integer">
<generator class="sequence">
<param name="sequence">personal_seq</param>
</generator>
</id>
<property name="name"
type="java.lang.String" column="name" not-null="true" />
<property name="deptno"
type="java.lang.Integer" column="DEPTNO" not-null="true" />
<component name="permentaddress" class="com.aims.beans.Address">
<property name="homeAddress1" type="java.lang.String" column="pddress1"/>
<property name="homeAddress2" type="java.lang.String" column="pddress2"/>
<property name="homecity" type="java.lang.String" column="pcity"/>
<property name="homeState" type="java.lang.String" column="pstate"/>
</component>
<set name="famildtlslst">
<key column="pid" not-null="true"/>
<one-to-many class="com.aims.beans.FamillyDetails"/>
</set>
<join table="address">
<key column="pid" />
<component name="Address" class="com.aims.beans.Address">
<property name="homeAddress1"
type="java.lang.String" column="HomeAddress1"/>
<property name="homeAddress2"
type="java.lang.String" column="HomeAddress2"/>
<property name="homecity"
type="java.lang.String" column="homecity"/>
<property name="homeState"
type="java.lang.String" column="homestate"/>
</component>
</join>
私を助けてください。