-
Jan 17th, 2006, 12:53 PM
#1
StaleStateException: Batch update returned unexpected row count from update
I'm having another problem with Spring and Hibernate in my JUnit tests.
In an earlier thread I noted a misunderstanding I'm having with AbstractTransactionalDataSourceSpringContextTests:
http://forum.springframework.org/showthread.php?t=21481
As a workaround until I figure out the right answer, I decided to write my JUnit test in such a way that I create a instance, save it in the database, make sure that the number of instances has been incremented by one, delete it, make sure the number of instances has been decremented by one. Clever!
But when I run the test, I get this Hibernate exception:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
The REAL fix is to figure out what I've done wrong with the Spring class. But if I had to go this way, what would the fix be? Thanks.
%
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules