What's new in Hibernate 5?

Hibernate Java - Hibernate Open Source ORM tool in Java What is difference between Hibernate 4 and 5? Hibernate 5.3 features Hibernate 5 JPA Configuration Hibernate 5 persistence.xml example Hibernate 5 JPA Tutorial Hibernate and JPA Example How properties of a class are mapped to the columns of a database table in Hibernate? Hibernate 5 Annotations Maven dependency Hibernate 5 annotationconfiguration Doctype Hibernate-configuration 5 Hibernate 5 Dialect Hibernate 5 configuration dtd Hibernate 5 Hello World Getting started with Hibernate 5 Hibernate 5.2.10 jar Download Hibernate 5.2.10 Maven Dependency Hibernate 5 Maven Dependency Hibernate 5 native query example Hibernate 5 query deprecated When should you use Hibernate? What's new in Hibernate 5? How much time it takes to learn Hibernate? Hibernate envers custom revinfo table Hibernate 5 Envers Hibernate Envers get all revisions Hibernate Examples Hibernate 5 build SessionFactory Example Hibernate 5 SessionFactory Example Hibernate 5 Annotation Example How to download Hibernate 5.x? Hibernate 5 Features Hibernate 5 Tutorials Learning Hibernate ORM - Free Training/Tutorial videos of Hibernate ORM with Java How to write hello world example program in Hibernate? How to create one to one relationship in Hibernate 4 with Annotation? How to calculate minimum in Hibernate using the min() Function Hibernate ORM 4.2.21.Final Released - Create CURD application in latest Hibernate Hibernate ORM 4.2.21 Tutorial - Learn Hibernate ORM Framework Hibernate Error: Failed to create sessionFactory object.java.lang.NoClassDefFoundError

What's new in Hibernate 5?

What are the new feature in Hibernate 5?

What are the new feature in Hibernate 5?

Hibernate 5 - What's new in Hibernate 5 Framework?

Hibernate ORM 5.2.10 Final is just released with many new features and improvements. In generate what are the new features which is added to the Hibernate 5 and how to use these features in making applications?

In Hibernate 5 many news features and improvements are present. Developers using Hibernate Framework should know all these features of Hibernate 5. Let's see the new features and changes made in Hibernate 5.

1. Hibernate Search

Hibernate search come with great features in Hibernate 5. It automatically indexes the objects and offers full-text search along with fast search. It also comes with the clustering features and using Hibernate Search features is very easy now.

2. Hibernate Validator in ORM 5

Hibernate validator comes with re ready to use validation functions like Email, Length, Not blank etc..

3. Java 8 Support in Hibernate ORM 5

Hibernate 5 fully supports Java 8 features and you can use the features of Java 8 in your Hibernate 5 applications. It support Java 8 date/time types in Hibernate 5 based applications. It supports:

DATE: java.time.LocalDate
TIME: java.time.LocalTime, java.time.OffsetTime
TIMESTAMP: java.time.Instant, java.time.LocalDateTime, java.time.OffsetDateTime and java.time.ZonedDateTime

4. OGM

Hibernate 5 supports OGM and through this you can use Hibernate to persist data into NoSQL databases.

5. New Bootstrap API

Hibernate 5 comes with new Bootstrap API which improves performance and helps in better integration.

You can use the Hibernate 5 without persistence.xml through new bootstrap API. Hibernate JPA environment can be configured programmatically in runtime.

6. Ad-hoc Joins

The ad-hoc joins feature is added in Hibernate 5.1 release.

7. Multi-entity loader

This feature is also added in Hibernate 5.1.

8. Features added in Hibernate 5.2

Following new features are added in Hibernate 5.2:

  • Query.stream() can be used in Hibernate 5.2
  • All the JPA methods can be accessed from Session Object
  • It supports JCache
  • Support for Session-level batch size
  • Global timezone setting (e.g. UTC
  • Now it supports Distinct pass-through hint
  • More efficient HQL and JPQL
  •  hibernate.connection.provider_disables_autocommit resource-local transaction optimization in Hibernate 5.2. Old behavior can be switched on by setting hibernate.id.new_generator_mapping to false

So, Hibernate 5.x comes with many new features and developers should start using it in their project. Check more at Hibernate 5 Features page.