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
|
|