Today, we published a new maintenance release of Hibernate ORM 6.2: 6.2.2.Final.
This release includes several bug fixes and small performance improvements.
Batch fetch performance
The performance of batch fetch loading (
@BatchSize) has been improved by better caching of
SQL AST and other references where possible. See HHH-16441 for details.
SQL ARRAY for multi-key loads
When loading entities or collections by multiple keys, Hibernate can now utilize a SQL ARRAY valued parameter to pass all ids at once. This is implemented for all multi-key loads:
|This is limited to single-column keys and databases which support ARRAY types. In cases where an ARRAY parameter cannot be used, Hibernate falls back to its padded strategy which uses a pre-built SQL AST with a fix-sized IN parameter list.|
See HHH-16466 for details.
Table resolution and self referencing associations
We have fixed how Hibernate internally resolves the table references to use in a query, with special care put towards self referencing associations and possible optimizations using foreign key columns (see HHH-16382 and related issues).
We have fixed a couple issues related to bytecode enhancement:
Faulty code was generated when bidirectional association management was enabled, preventing Hibernate from correctly handling both sides of the association (see HHH-15602).
When both a lazy
@ManyToOneassociation and an eager one were used on the same entity, in some cases Hibernate would not eagerly initialize the latter (see HHH-16477).
GROUP BY and ORDER BY clauses
We have fixed several bugs related to GROUP BY and ORDER BY clauses:
When grouping by an entity valued property (like a to-one association), we now always expand the rendered GROUP BY clause to use all columns of the entity type to guarantee that the underlying DBMS can correctly group the selections (see HHH-16409).
When using window or ordered-set aggregate functions, we now explicitly disallow using aliased or positional expressions in the ORDER BY clause to prevent problematic query interpretation. We also fixed a bug that was preventing users from ordering by multiple column expression in
WITHIN GROUPclauses (see HHH-16347).
We fixed a bug causing the
@Where clause to be mis-rendered when used in a delete mutation query, specifically for the subquery to clean up association tables (see HHH-16392).
Sybase and jConnect JDBC driver
We have fixed several issues encountered when using Sybase with the jConnect JDBC driver, for a detailed view of the fixes please see the full list of changes link at the bottom of the page.
Support for Java Records annotated with
@Embeddable was introduced with Hibernate 6.2, but there were still a couple issues:
For additional details, see:
the User Guide
the Migration Guide
the release page.
Feedback, issues, ideas?
To get in touch, use the usual channels:
hibernate tag on Stack Overflow (usage questions)
User forum (usage questions, general feedback)
Issue tracker (bug reports, feature requests)
Mailing list (development-related discussions)