Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's new in Hibernate ORM 5?

I just saw that the 4th candidate got released for Hibernate 5. What's new in 5 compared to earlier versions?

like image 236
Shri S Softwares Avatar asked Aug 12 '15 12:08

Shri S Softwares


People also ask

What's new in Hibernate?

Significant new features include a migration to the Jakarta Persistence 3.0 specification, performance improvements to JDBC, and HQL translation and criteria translation. With this release, Hibernate requires a minimum of Java 11.

Is Hibernate ORM good?

JPA and Hibernate ORM are a great fit for standard CRUD operations. They make the implementation of these use cases very easy and efficient.

What's new In Hibernate ORM?

A detailed list of new features, improvements and fixes in this series can be found on our issue tracker. Hibernate ORM 5.5 adds new artifacts with the artifact id suffix "-jakarta" like hibernate-core-jakarta.

What is the difference between hibernate-core-Jakarta and Hibernate ORM?

Hibernate ORM 5.5 adds new artifacts with the artifact id suffix "-jakarta" like hibernate-core-jakarta. The hibernate-core-jakarta artifact implements the Jakarta JPA 3.0 specification, while the hibernate-core artifact still implements the Jakarta JPA 2.2 specification.

Where are the Hibernate ORM artifacts published?

Maven artifacts of Hibernate ORM are published to Maven Central and to the JBoss Maven repository. Refer to the Maven Getting Started guide on the JBoss Wiki for more information on how to configure the JBoss Maven repository.


1 Answers

Some exciting features has been added/enhanced in Hibernate 5.x. Have a quick look.

1. Hibernate Search

Hibernate Search transparently indexes your objects and offers fast regular, full-text and geolocation search. Ease of use and easy clustering are core.

  • Full-text search for entities - find by approximation (fuzzy search)
  • Cluster-friendly - offers several easy to setup clustering strategies
  • Faceting and geolocation - Geolocalized entities are as easy as @Spatial

For more details on Hibernate Search view this.

2. Hibernate Validator

Hibernate Validator comes with a handful of built-in validation rules like Email, Length, NotBlank etc.

Express validation rules in a standardized way using annotation-based constraints and benefit from transparent integration with a wide variety of frameworks.

For more details on Hibernate Validator view this.

3. Improved Java 8 Support

Java 8 date/time data types (JSR 310) are supported and can be validated via @Past and @Future. Also Optional and JavaFX types are supported via an improved ValidatedValueUnwrapper.

4. Hibernate OGM

Just released the first stable version.

5. Bootstrapping API

New bootstrapping API - better determinism, better integration


A few other things:

  • Scanning support for non-JPA usage
  • NamingStrategy has been removed in favor of a better designed API
  • Ability to handle additional Java types for id attributes marked as GenerationType#AUTO. Built-in support for Number and UUID. Expandable via new org.hibernate.boot.model.IdGeneratorStrategyInterpreter extension.
  • Additionally, support for AttributeConverters has been expanded and more fully realized

Check Hibernate ORM Roadmap for more details.

like image 146
Bacteria Avatar answered Oct 04 '22 22:10

Bacteria