Hi
I keep getting the following error when parsing my mapping files
10:01:22,932 ERROR [XMLHelper] Error parsing XML: XML InputStream(24) Attribute "not-null" must be declared for element type "key".
10:01:22,934 ERROR [XMLHelper] Error parsing XML: XML InputStream(25) Attribute "not-null" must be declared for element type "many-to-many".
I have the "not-null" attribute set to true in the .hbm.xml file for this class, and i have tried different orderings but it doesn't seem to make any difference. I'm using 2.1 final, jboss-3.2.1 and mysql 4.0.13
<hibernate-mapping>
<class name="com.generator.dom.hibernate.Status" table="status" discriminator-value="stts" proxy="com.generator.dom.hibernate.Status">
<id name="id" column="statusid" type="long">
<generator class="native"/>
</id>
<property name="status" type="java.lang.String" not-null="true"/>
<set name="types" table="status_statustypex" inverse="true" lazy="true">
<key not-null="true" column="statusid"/>
<many-to-many not-null="true" column="typeid" class="com.generator.dom.hibernate.StatusType"/>
</set>
</class>
</hibernate-mapping>
Here is other side of the relationship:
<hibernate-mapping>
<class name="com.generator.dom.hibernate.StatusType" table="statustypes" discriminator-value="stty" proxy="com.generator.dom.hibernate.StatusType">
<id name="id" column="typeid" type="long">
<generator class="native"/>
</id>
<property name="type" type="java.lang.String" not-null="true"/>
<set name="status" table="status_statustypex" lazy="true">
<key not-null="true" column="typeid"/>
<many-to-many not-null="true" column="statusid" class="com.generator.dom.hibernate.Status"/>
</set>
</class>
</hibernate-mapping>
thanks in advance for any help
cheers
andy
|