-->
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: Update query is firing instead of Insert query
PostPosted: Thu Dec 09, 2010 10:36 am 
Newbie

Joined: Wed Dec 08, 2010 5:26 am
Posts: 4
Hi,
i have requirement where i need to display two records. here user can add more records by right clicking (using gwt ). user tries to remove those two records and adds one more record, then i need to delete 2 records and insert 1 record. i am passing 2 separate lists, one contains deleted rrecords, the other one contains inserted records. the problem is 2 recordds are deleted but for the other record to be inserted, hibernate is firing update query instead of insert query. I am using merge().
please suggest me..

Thanks,
Salmon


Top
 Profile  
 
 Post subject: Re: Update query is firing instead of Insert query
PostPosted: Thu Dec 09, 2010 10:56 am 
Newbie

Joined: Mon Nov 19, 2007 1:57 pm
Posts: 14
Have you checked ID of inserted records?


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.