Nemanja Jovanovic (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYWExNTFlYjky...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16713?atlOrigin=eyJpIjoiYWExNT...
) HHH-16713 (
https://hibernate.atlassian.net/browse/HHH-16713?atlOrigin=eyJpIjoiYWExNT...
) Bogus warning : "HHH100001: JDBC driver did not return the expected number of row
counts...." (
https://hibernate.atlassian.net/browse/HHH-16713?atlOrigin=eyJpIjoiYWExNT...
)
Issue Type: Bug Affects Versions: 6.2.3 Assignee: Unassigned Created: 29/May/2023 08:29 AM
Environment: Hibernate 6.2.3.Final, Adoptium 17 JDK, HSQL(used in test) Priority: Minor
Reporter: Nemanja Jovanovic (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
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. Also in
{{org.hibernate.engine.jdbc.batch.internal.BatchImpl.checkRowCounts }} when logging
warning expected and actual are switched.
(
https://hibernate.atlassian.net/browse/HHH-16713#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16713#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:85acc52 )