This tutorial is designed for all those Java programmers who would like to understand the Hibernate framework and its API.
All the examples in this tutorial have been developed using Hibernate 6+.
Check out 35 + Hibernate Framework source code examples at my GitHub repository and below are their corresponding articles.
Check out 35 + Hibernate Framework source code examples at my GitHub repository and below are their corresponding articles.
YouTube Video - What is Hibernate and How it Works?
1. Hibernate Getting Started
- ✅ Hibernate Framework Overview - Architecture and Basics - In this article, let's familiarize ourselves with a few basic concepts of the hibernate framework, architecture, benefits, and advantages over JDBC, etc.
- ✅ Simple Hibernate Example Tutorial - In this Hibernate tutorial, we will show you how to create a Hibernate Application to connect MySQL database.
- ✅ Hibernate XML Configuration Example - In this article, we will show you how to create a Hibernate Application using hibernate.cfg.xml configuration to connect to the MySQL database.
- ✅ Hibernate Java Configuration Example - In this article, we will show you how to create a Hibernate Application using Java configuration without using hibernate.cfg.xml to connect to the MySQL database.
- ✅ JPA and Hibernate Primary Key Generation Strategies - Let's discuss 4 different primary key generation strategies that generate the primary key values programmatically or use database features, like auto-incremented columns or sequences.
- ✅ Guide to JPA and Hibernate Cascade Types - JPA allows you to propagate the state transition from a parent entity to a child. This article describes all cascade types with an example.
- ✅ Hibernate Enum Type Mapping Example - In this article, we will show you how a Java enum type is persisted into a database.
- ✅ Hibernate @Embeddable and @Embedded Annotation - With Hibernate we can use the @Embeddable annotation to mark a class to be eligible as an embeddable class.
- ✅ Hibernate Object States – Transient, Persistent, and Detached - In this article, we will discuss what are Hibernate object states with examples.
2. Hibernate Session Methods (With Examples)
- ✅ Hibernate - Save an Entity Example - In this article, we will create a simple Hibernate application to demonstrate how to save an entity into a database.
- ✅ Hibernate - Persist an Entity Example - In this article, we will create a simple Hibernate application to demonstrate how to persist an entity into a database.
- ✅ Hibernate - saveOrUpdate() Method Example - In this article, we will create a simple Hibernate application to demonstrate how to save or update an entity in the database using the saveOrUpdate() method.
- ✅ Hibernate - get(), load(), and byId() Method Examples - In this article, we will show you how to use Session.get(), Session.load() and Session.byId() methods to retrieve an entity from database.
- ✅ Hibernate - merge() Example - In this article, we will show you how to use Session.merge() method to merge an entity in Hibernate Application.
- ✅ Hibernate - Delete or Remove an Entity Example - In Hibernate, an entity can be removed from a database by calling the Session.delete() or Session.remove(). Using these methods, we can remove a transient or persistent object from the datastore.
- ✅ Hibernate - load() Method Example - In this article, we will create a simple Hibernate application using Java configuration without using hibernate.cfg.xml to demonstrate the usage of the Session.load() method.
- ✅ Hibernate Session.evict() Method Example - In this short article, we will learn how to remove cache objects from the first level cache using the Session.evict() method with an example.
- ✅ Hibernate Session.clear() Method Example - In this short article, we will learn how to remove cache objects from the first level cache using the Session.clear() method with an example.
- ✅ Hibernate Transaction Management Tutorial - In this tutorial, we will learn how to manage transactions in Hibernate applications.
3. Hibernate Mappings
- ✅ Hibernate - One-to-One Mapping Annotation Example - In this tutorial, we will learn how to implement step-by-step one-to-one entity mapping using JPA and Hibernate, and the MySQL database.
- ✅ Hibernate - One to Many Mapping Annotation Example - In this tutorial, we will learn how to implement step-by-step one-to-many entity mapping using JPA, Hibernate, and MySQL database.
- ✅ Hibernate - Many to Many Annotation Mapping Example - In this tutorial, we will learn how to implement step-by-step many-to-many entity mapping using JPA/Hibernate with MySQL database.
- ✅ Hibernate One to Many CRUD Example - In this tutorial, we will learn how to implement One-to-Many mapping CRUD operations using JPA/Hibernate.
- ✅ Hibernate One-to-One CRUD Example - - In this tutorial, we will learn how to implement One-to-One mapping CRUD operations using JPA/Hibernate.
- ✅ Hibernate @PrimaryKeyJoinColumn Annotation | One-to-One Mapping Example - In this tutorial, we will learn how to implement Hibernate one-to-one mapping with a shared primary key using @PrimaryKeyJoinColumn annotation.
4. Inheritance Mapping
- ✅ Hibernate - Inheritance Mapping - In this article, we will learn 4 inheritance strategies with examples.
- ✅ Hibernate/JPA MappedSuperclass Inheritance Example - The JPA standard specification defines the @MappedSuperclass annotation to allow an entity to inherit properties from a base class.
- ✅ Hibernate/JPA Single Table Inheritance Example - In this article, we will discuss The single table strategy which maps all entities of the inheritance structure to the same database table.
- ✅ Hibernate JPA Joined Table Inheritance Example - In this article, we will discuss The Joined table strategy or table-per-subclass mapping strategy.
- ✅ Hibernate/JPA Table Per Class Inheritance Example - In this article, we’ll look into Hibernate/JPA table per class inheritance.
5. Hibernate Query Language
- ✅ Hibernate Query Language Basics - This article describes the basics of HQL.
- ✅ Hibernate Query Language INSERT, UPDATE, SELECT, and DELETE Example - In this article, we will discuss how to create a simple Hibernate Query Language INSERT, UPDATE, SELECT, and DELETE Example.
- ✅ Hibernate - HQL CRUD Example [Snippets] - In this article, we will see quick snippets or examples of Hibernate HQL CRUD Example.
- ✅ Hibernate Named Query Tutorial with Examples - This tutorial shows you how to use the named query annotations in the hibernate application.
6. Hibernate with Java 8
- ✅ Hibernate Java 8 LocalDate, LocalDateTime, and Duration Example - In this article, we will learn how to persist Java 8 LocalDate, LocalDateTime, and Duration with Hibernate.
7. Database
- ✅ Guide to Hibernate Schema Generation - In this guide, You will learn how Hibernate allows you to generate the database from the entity mappings. In this guide, we will the following points.
- ✅ Guide to Hibernate Native SQL Queries - Let's learn more about Hibernate native SQL queries with examples snippets.
- ✅ Hibernate - Using Stored Procedures for Querying - Hibernate provides support for queries via stored procedures and functions
- ✅ Hibernate c3p0 Connection Pool Example - In this article, we will show how to use c3p0 connection pooling in hibernate applications.
8. Hibernate Annotations
- ✅ All Hibernate Annotations: Mapping Annotations - A quick reference to all Hibernate mapping annotations.
- ✅ All JPA Annotations: Mapping Annotations - A quick reference to all JPA mapping annotations.
- ✅ Hibernate Component Mapping Using @Embeddable and @Embedded Annotation - With Hibernate we can use the @Embeddable annotation to mark a class to be eligible as an embeddable class.
9. JPA/Hibernate Association Mapping
10. Hibernate with In-memory Database
11. Hibernate Interview Questions and Answers
12. Web app using JSP, Servlet, MySQL, and Hibernate
- ✅ JSP Servlet Hibernate CRUD Example // Web application
- ✅ JSP Servlet Hibernate Web Application // Web application
- ✅ Hibernate Registration Form Example with JSP, Servlet, MySQL // Web application
- ✅ Login Form using JSP + Servlet + Hibernate + MySQL Example // Web application
13. Misc
- ✅ Hibernate Configurations Quick References [Snippets] - This post is a quick reference to Hibernate XML or Java-based configuration.
- ✅ JPA with Hibernate Bootstrapping Example - In this post, we will show you how to create or configure a simple JPA application with Hibernate.
- ✅ Hibernate Session Interface Methods with Examples - In this post, we will discuss important Session interface methods to perform database operations in Java Hibernate applications.
- ✅ Hibernate Create, Read, Update and Delete (CRUD) Operations Example - In this article, we will discuss how to use Hibernate to perform CRUD operations against the database. In this example, we are using MySQL as a database.
- ✅ Hibernate First Level Cache with Example - In this post, we will understand the hibernate of the first-level cache with an example.
- ✅ Hibernate Example with MySQL Database - In this tutorial, we will learn how how to create Hibernate project that talks with MySQL database.
14. GitHub Repository
- ✅ JPA with Hibernate Bootstrapping Example - In this post, we will show you how to create or configure a simple JPA application with Hibernate.
- ✅ Hibernate Session Interface Methods with Examples - In this post, we will discuss important Session interface methods to perform database operations in Java Hibernate applications.
- ✅ Hibernate Create, Read, Update and Delete (CRUD) Operations Example - In this article, we will discuss how to use Hibernate to perform CRUD operations against the database. In this example, we are using MySQL as a database.
- ✅ Hibernate First Level Cache with Example - In this post, we will understand the hibernate of the first-level cache with an example.
- ✅ Hibernate Example with MySQL Database - In this tutorial, we will learn how how to create Hibernate project that talks with MySQL database.
The complete source code of this tutorial is available on my GitHub Repository - https://github.com/RameshMF/Hibernate-ORM-Tutorials
15. Hibernate Video Tutorials on my YouTube Channel
- Hibernate Framework Basics and Architecture
- Hibernate Example with MySQL, Maven, and Eclipse
- Hibernate XML Config with Maven + Eclipse + MySQL
- Hibernate CRUD Example in Eclipse IDE
- Hibernate First Level Cache with Example
- Hibernate HQL Tutorial
- Hibernate Transaction Management Tutorial
- Hibernate - c3p0 Connection Pool
- Hibernate One to One Mapping Annotation
- Hibernate One to Many Mapping Annotation
- Hibernate Many to Many Mapping Annotation
- JSP Servlet Hibernate CRUD Example
- Hibernate H2 Database Example Tutorial
- Difference Between Hibernate and Spring Data JPA
- Difference Between JPA and Hibernate
- Hibernate Create, Read, Update and Delete (CRUD) Operations
- Hibernate Tutorial for Beginners
- Hibernate - save() vs persist()
- Hibernate - save() vs saveOrUpdate()
- Hibernate get vs load
- JSP Servlet Hibernate Database Web App
- JSP Servlet Hibernate CRUD Database Tutorial
- Login Application using JSP + Servlet + Hibernate
Free Spring Boot Tutorial | Full In-depth Course | Learn Spring Boot in 10 Hours
Watch this course on YouTube at Spring Boot Tutorial | Fee 10 Hours Full Course