[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3083?page=c...
]
Gail Badner resolved HHH-3083.
------------------------------
Assignee: Gail Badner
Resolution: Rejected
This is expected behavior. Please ask questions on
http://forum.hibernate.org/.
Incorrect delete handling
-------------------------
Key: HHH-3083
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3083
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.5
Environment: 3.2.5.ga
Reporter: Krashan Brahmanjara
Assignee: Gail Badner
When user try to delete not existing row from database see long exception message.
Real databases like Informix report status=0 and don't report any error in this case
and users probably expect the same from Hibernate. I think that should be rather
NotFoundException than org.hibernate.StaleStateException etc.
I see this error also when hibernate.jdbc.batch_size is 0 a
Current exception trace in this case
2008-01-24 15:48:43 org.hibernate.event.def.AbstractFlushingEventListener
performExecutions
SEVERE: 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
at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:24)
at
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2520)
at
org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2697)
at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:74)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:146)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira