When batching is turned on for entities that update multiple tables when updated following warn is logged:
{{HHH100001: JDBC driver did not return the expected number of row counts}}
Problem is in {{org.hibernate.engine.jdbc.batch.internal.BatchImpl.checkRowCounts}} when determining {{expectedNumberOfCounts}}. In case when we are updating one entity (which will set {{batchPosition}} to 1 ) which for example extends entity with inheritance strategy set to {{InheritanceType.JOINED}} , thus creating two update statements to be executed in DB, {{expectedNumberOfCounts}} will be wrongfully determined to be 0 (1/2) and warning will be logged. This seems to be a bug is definitely wrong . Also in {{org.hibernate.engine.jdbc.batch.internal.BatchImpl.checkRowCounts }} when logging warning expected and actual are switched. Attached test case produces warning, see the console after execution |
|