Hibernate Tutorial


Hibernate is the best ORM tool till date and it has helped many developers to understand relational database from object oriented point of view.With the help of criteria and HQL, Hibernate has really made easy to analyse complex native sql query from object perspective.

In the below tutorials, we have discussed about the different mapping strategy provided by hibernate and criteria query.

Different Hibernate Naming Strategy

By Dhiraj, 20 January, 2018

This article discusses about different naming strategy provided by hibernate along with the shift of naming strategy from hibernate.ejb.naming_strategy in hibernate 4 to hibernate.implicit_naming_strategy and hibernate.physical_naming_strategy in hibernate 5.And at the end, we wil be take a look into implementing a custom naming strategy in hibernate and configuration to run with spring boot application.... Read more ➤

Hibernate Criteria Tutorial with Examples (Joins, Sub Query, Sorting)

By Amit Swain, 09 March, 2017

As we know hibernate criteria is a very important aspect of Hibernate framework as it simplifies the way to fetch tabular data from DB. In this article, we will be discussing about different examples on hibernate criteria. Starting from what is criteria, we will look into how to construct criteria... Read more ➤

Hibernate Inheritance Example (Single Table, Table Per Class, Joined Table Strategy)

By Dhiraj, 04 March, 2017

This article is about hibernate inheritance. Here we will be disussing about the different inheritance strategy supported by hibernate such as Single Table Strategy, Table per class strategy and Joined strategy along... Read more ➤

Hibernate Many to Many Mapping Example(Annotation Based)

By Dhiraj, 03 March, 2017

In this example we will be discussing about Many To Many mapping in hibernate with an example. We will take a look into how we make use of @JoinTable annotation along with mappedBy atribute in hibernate many to many example.... Read more ➤

Hibernate One to Many Relationship Example(Annotation Based)

By Dhiraj, 01 March, 2017

In this article we will be discussing about one to many relaionship in hibernate with annotations based configuration. We will be creating a simple employee - department one to many relationship and discuss the different annotations used in the example. We will be also discussing about... Read more ➤

Hibernate One to One Mapping Example(Annotation Based)

By Dhiraj, 27 February, 2017

This post is continuation to my last post - hibernate annotations. Here we will be discussing about hibernate one to one mapping in detail with an example. We will take a look into both unidirectional and bidirectional one to one realationship and even discuss about different optional annotations used in one to one mapping such as mappedBy, CascadeType,... Read more ➤

Hibernate Annotations Example

By Dhiraj, 26 February, 2017

Defining hibernate metadata using annotations is very common and there are lot of hibernate annotations available. This article will cover hibernate annotations that are required to get started with hibernate. We will be creating a simple hibernate example using hibernate annotations and... Read more ➤

Object Relational Mapping(ORM) in Java

By Dhiraj, 23 February, 2017

This article provides an insight of Object Relational Mapping. Starting from what is ORM, we will deep dive into its different concepts, facts to different ORM tools available, especially Hibernate in java, evolution from plain JDBC to ORM tool and how ORM tools have made developers life easy while dealing with tabular data format.... Read more ➤