-->
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: Duplicate Rows
PostPosted: Wed Aug 22, 2007 6:26 pm 
Newbie

Joined: Tue Jan 16, 2007 4:55 pm
Posts: 6
I have a situation where my hibernate objects are inserted by two different systems into the same table.

Obviously, if the same data is inserted, it throws an exception..
Is there a way , we can tell hibernate to ignore this exception ?
I dont want to handle this exception since i know , this is coz the other app has inserted the data... also, if i'm doing bulk inserts , then the rest of the inserts can fail, due to this exception ..


any thoughts...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 1:43 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

use session.saveOrUpdate() instead of just save()



Amila

(Don't forget to rate if helps)


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.