Hi, Hibernate gurus
According to URL:
http://www.hibernate.org/74.html#A13
there's a known problem of MS SQL Server driver(Microsoft's official driver) which fails to return correct
batch update number hibernate expected. So hibernate may throw stacktrace like:
Code:
net.sf.hibernate.HibernateException: Batch update row count wrong: 0
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:65)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:118)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:55)
at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:105)
at net.sf.hibernate.persister.EntityPersister.delete(EntityPersister.java:565)
at net.sf.hibernate.impl.ScheduledDeletion.execute(ScheduledDeletion.java:29)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2266)
We use hibernate 2.1.1. This prolem still crop up.
Is there any patch addressing this issue?
And what's the consequence if so-called // check return codes section in
BatchingBatcher(Line 56-68) is removed.
See $Id: BatchingBatcher.java,v 1.4.2.6 2003/11/27 16:09:59 oneovthafew Exp $
Or can we change the check policy to make expected update count to 0 when underlying
driver is MS SQL Server by introducing a config parameter such as "ignore_batchupdate_bug"?
Regards,
Justin
2004-03-05 11:08