Hibernate 5 ORM Features
Hibernate 5 is the major release of Hibernate framework, which provides the support for JDK 8 and Special database. In this article we are going to discuss all these features of Hibernate ORM 5.
In this tutorial series we will teach you Hibernate 5 with articles, tips and example codes. We have also provides you the necessary video tutorials of Hibernate 5 to explains the source code and examples projects.
RedHat is the company developing the Hibernate framework, Hibernate 5 was released on 20th August, 2015 with many new features and updated API. This release of Hibernate 5 perhaps a major release.
Let's see the features of Hibernate ORM 5:
New Bootstrap comes with release of Hibernate ORM. New bootstrap mechanism of the Hibernate SessionFactory has been introduced with many features. Although method of creating SessionFactory used in Hibernate 4 is still compatible.
Hibernate 5 supports following:
Support of Java 8 in Hibernate 5 is one of the most important changes and it provides the support for Java 8 Date and Time API. To include this feature in your project you have to add hibernate-java8.jar file into your project.
If you are using maven then include following dependency:
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-java8</artifactId> <version>5.1.0.Final</version> </dependency>
Here are the new classes introduced:
TIME: java.time.LocalTime, java.time.OffsetTime
TIMESTAMP: java.time.Instant, java.time.LocalDateTime, java.time.OffsetDateTime and java.time.ZoneDateTime
Java 5, 6 and 7
It comes with following features:
Hibernate 5 also supports AttributeConverter:
Hibernate 5 comes with support for full-text search through Lucene 5. So, developers can use the new features of Lucene full-text search engine in their applications.
Full-text Search support:
New features of Hibernate 5 are:
This is another major feature of Hibernate 5 as through OGM it provides the ability of persistence to the NoSQL Database. In BigData environment Hibernate 5 can be used to interact with the NoSQL Databases such as Redis, Cassandra and others.
Hibernate provides the JPA(Java Persistence) support for NoSQL databases. It supports:
The Envers project of Hibernate enables the developer to audit the persistent classes in the application. The aim of the Envers project is to provide the ability to developers for auditing of persistent classes.
Developers will be able to use the Envers feature in application by just adding @Audited annotation in the persistence class. The Envers project will create a table for each entity which is being audited. This table hold the audit history of the changes which is made to the entity. It also allows the developer to query the historical data with ease.
In this we have discussed the features of Hibernate 5 ORM which comes with major features and also support for NoSQL databases through OGM. Check all the Hibernate 5 tutorials.
Posted on: March 12, 2017 If you enjoyed this post then why not add us on Google+? Add us to your Circles