Hello Every body,
I am using hibernate 2.1.2
Here is my hbm.xml file:
<hibernate-mapping>
<class name="com.mislbd.iris.inventory.core.store.StoreDTO" table="Store">
<id name="id" column="storeId"> <generator class="increment"/> </id> <many-to-one name="inventoryHouse" column="depotInventoryId" class="com.mislbd.iris.inventory.core.inventoryhouse.DepotInventoryDTO" not-null="true" /> <property name="code" /> <property name="location" /> <property name="creationDate" /> <property name="status" /> <property name="description" /> <property name="remarks" />
<list name="storeLines" table="StoreLines" > <key column="storeLineId"/> <index column="storeLineIndex" type="integer"/>
<composite-element class="com.mislbd.iris.inventory.core.store.StoreLineDTO"> <property name="quantity"/> <property name="backOrderQuantity"/> <property name="openingBalance"/> <property name="closingBalance"/> <property name="reorderingQuantity"/> <property name="bookedQuantity"/> <many-to-one name="product" not-null="true" /> <component name="selectedUnit" class="com.mislbd.iris.inventory.core.util.unit.UnitDTO"> <property name="name" column="unitName"/> </component> </composite-element> </list>
</class>
</hibernate-mapping>
This mapping xml file generates exception. It worked with hibernate 2. But it does not work in hibernate 2.1.2
Here is exception:
Caused by: org.xml.sax.SAXParseException: The content of element type "composite-element" must match "(parent?,(property|many-to-one|any|nested-composite-element)*)".
I need to save the name of the selectedUnit of class UnitDTO in StoreLineDTO .
Whats the soluntion in that case.
pls help me.
Regards
Banik[/b]
|