-->
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: unexpected row count with native generator
PostPosted: Fri May 27, 2005 5:52 am 
Newbie

Joined: Mon Oct 04, 2004 10:54 am
Posts: 15
Hibernate version: 3.01

Hi I've been running into an "unexpected row count" error, when calling flush() after a batch-job (I think after a call to saveOrUpdate()).
There are no cascades.
Below is the error and a mapping example. How to solve this problem? I set unsaved-value="-1"...

Thanks in advance!


Mapping documents:
<class name="com.ericsson.rgv.platform.database.hibernate.FtpThroughPutBean"
table="FTP_THROUGHPUT"
lazy="false"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version"
>
<id name="ftpThroughPutId" type="int" unsaved-value="-1">
<column name="FTP_THROUGHPUT_ID"
not-null="true"
sql-type="INTEGER"/>
<generator class="native"></generator>
</id>
....

ERRORS:
ERROR [jdbc.AbstractBatcher]: Exception executing batch:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1

ERROR [def.AbstractFlushingEventListener]: Could not synchronize database state with session
org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1


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.