When I used hbm2java, I got the following error message:
Code:
SAXParseException: Attribute "extends" must be declared for element type "joined-subclass".
my hbm.xml file is as follows:
Code:
<hibernate-mapping>
<joined-subclass
name="com.hhy.cim302.BusinessUnit"
extends="com.hhy.core.Resource"
table="cim_302_businessunit">
<key column="resourceId"/>
<property name="businessUnitName"
column="businessunitname"
type="string"
length="50"/>
<property name="businessUnitDescription"
column="businessunitdescr"
type="string"
length="50"/>
<!--(1,*) to (1)-->
<many-to-one name="companyID" column="companyid" class="com.hhy.core.Company"/>
</joined-subclass>
</hibernate-mapping>
I once saw a similar hbm.xml file in Hibernate2.1 package:
Code:
<hibernate-mapping>
<joined-subclass
name="org.hibernate.test.Mono"
extends="org.hibernate.test.Top"
table="mono"
dynamic-insert="true"
dynamic-update="true">
<key column="superid"/>
<set name="strings" table="monostrings">
<key column="monoid_"/>
<element type="string" column="str_"/>
</set>
</joined-subclass>
</hibernate-mapping>
It's too weird that I couldn't find out even one error in my hbm.xml file !