-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Composite element exception
PostPosted: Sun Apr 04, 2004 8:14 am 
Newbie

Joined: Sun Nov 30, 2003 10:09 am
Posts: 14
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]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 04, 2004 9:05 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You are mistaken. This mapping never worked in any version of Hibernate, since you must use <nested-composite-element>, rather than a nested <component> element.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.