-->
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.  [ 1 post ] 
Author Message
 Post subject: Exception while saving XML data with replicate()
PostPosted: Fri Apr 21, 2006 6:50 am 
Newbie

Joined: Mon Mar 20, 2006 8:42 am
Posts: 11
I am working on data export/import using dom4j + replicate.

in <one-to-many> and many-to-many> relation one record instance is found more than once. When one particular child record is encountered second time in the data it gives the following exception.

exception that occurs:

"Duplicate entry '40288ca8fd76c5ac00fd76c5ae530003-40288ca8fd76c5ac00fd76c5ae350001' for key 1"

Hibernate version: 3.0

Mapping documents:
Code:
<set name="contacts" table="ContactLocationRelationship" cascade="replicate" node="." embed-xml="true">
   <key>
      <column name="customerid" />
      <column name="locationid" />
   </key>
   <many-to-many class="com.sbs.xml.info.XmlContactInfo" embed-xml="true">
      <column name="contactid" />
   </many-to-many>
</set>


Code between sessionFactory.openSession() and session.close():
Code:
dom4jSession.replicate("com.sbs.xml.CustomerInfo", objElement, ReplicationMode.IGNORE);


Name and version of the database you are using: MySql 5.0

any help will be highly appreciated.

_________________
Aisha


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

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.