Mutation statements using delegates do not consistently release statements

Description

As reported originally in this forum thread, identity-generated identifiers were handled through identity mutation delegates in Hibernate 6.4 that caused a Statement to be closed multiple times resulting in unnecessary operations and triggering suppressed exceptions (e.g. java.sql.SQLException: No operations allowed after statement closed).

This behavior should already have been addressed in 6.5 with and the refactoring of generic MutationDelegates, but we should make sure by adding a test and fix it on the current stable version 6.4.

Activity

Show:

Marco Belladelli February 6, 2024 at 3:08 PM

After further analyzing the different MutationDelegates, other than closing the same statement multiple times I came across several instances where result sets / statements were not being correctly release. I’ve added assertions both in the test and in the MutationExecutors to ensure the delegates correctly take care of releasing all resources, both on the current version and in 6.4

Fixed

Details

Assignee

Reporter

Sprint

Fix versions

Affects versions

Priority

Created January 30, 2024 at 1:26 PM
Updated February 8, 2024 at 1:15 PM
Resolved February 7, 2024 at 9:16 AM