[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-3083) Incorrect delete handling
Gail Badner (JIRA)
noreply at atlassian.com
Thu Jan 24 12:04:55 EST 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list