Mutation statements using delegates do not consistently release statements
Description
Activity
Show:
Marco Belladelli February 6, 2024 at 3:08 PM
After further analyzing the different MutationDelegate
s, 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 MutationExecutor
s to ensure the delegates correctly take care of releasing all resources, both on the current version and in 6.4
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
MutationDelegate
s, but we should make sure by adding a test and fix it on the current stable version 6.4.