-->
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: Batch update returned unexpected row count from update
PostPosted: Fri Nov 02, 2007 12:56 pm 
Newbie

Joined: Fri Sep 28, 2007 3:45 pm
Posts: 9
Hi guys. I am a relatively new hibernate user and I am having some problems persisting an object to db.

I have a wish list application where a list of items is retrieved from the db. Initially the list is retrieved empty from the db. The user can add items to the list and save. The problem I am facing is that hibernate is trying to update the db as follows:

Hibernate: update wish_list_items set wish_list_id=?, item_id=? where item_id=?

The problem is that since these items are new, the update returns 0 affected rows. So I get:

org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

Actually, I dont want hibernate to do any such operation automatically. I can handle this myself. Is there any way to get that working? Thanks


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.