Hibernate ORM 6.4.0 has just been released. Simultaneously, 6.3.2 has also been released.

6.4 adds some cool new features, in addition to many improvements and fixes.

Soft Delete

6.4 adds support for soft deletes using the new @SoftDelete annotation.

@Entity
@SoftDelete
class Account {
        ...
}

Dealing with values as deleted/non-deleted versus active/inactive (reversed) is simple using an annotation attribute:

@Entity
@SoftDelete(strategy=ACTIVE)
class Account {
        ...
}

It even supports pluggable converters for dealing with what gets stored in the database.

See the User Guide for details.

HQL Vector Support

6.4 introduces a new module hibernate-vector that offers support for mathematical vector types and functions that are useful for the AI/ML space to do vector similarity search.

The current implementation only supports running with PostgreSQL with the pgvector extension enabled and maps various functions to the underlying pgvector operators that enable efficient index access.

See the Query Guide for details.

HQL/Criteria Array Functions

Following up on earlier work, 6.4 adds the remaining functions for handling arrays in HQL and Criteria queries.

See the Query Guide for excellent coverage of these functions.

These functions are still incubating and some things (names, etc.) may change before Final.

Java Flight Recorder Events

6.4 adds support for producing Java Flight Recorder (JFR) events. This works natively on many JDKs, but we recently discovered that not all of them implement the JFR spec, despite it being part of Open JDK.

For this reason we have created a separate module that will ensure compatibility, and applications will need to include the new hibernate-jfr artifact on the classpath in order to use Java Flight Recorder events integration.

See the User Guide for details.

Non-String Tenant Id

6.4 adds support for using tenant-id with types other than String.

See HHH-14822 for details.

Conclusion

For additional details, see:

See also the following resources related to supported APIs:

Feedback, issues, ideas?

To get in touch, use the usual channels:


Back to top