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
|