Let's get started with a Microservice Architecture with Spring Cloud:
Learn JPA & Hibernate Series
Last updated: October 19, 2023
Object-Relational Mapping (ORM) is the process of converting Java objects to database tables. In other words, this allows us to interact with a relational database without any SQL. The Java Persistence API (JPA) is a specification that defines how to persist data in Java applications. The primary focus of JPA is the ORM layer.
Hibernate is one of the most popular Java ORM frameworks in use today. Its first release was almost twenty years ago, and still has excellent community support and regular releases. Additionally, Hibernate is a standard implementation of the JPA specification, with a few additional features that are specific to Hibernate. Let’s take a look at some core features of JPA and Hibernate.
.
.
.
.
.
Defining Entities
- Defining JPA Entities
- Hibernate Entity Lifecycle
- JPA Entity Lifecycle Events
- Default Column Values in JPA
- JPA @Basic Annotation
- Mapping Entity Class Names to SQL Table Names with JPA
- Difference Between @Size, @Length, and @Column(length=value)
- JPA Entity Equality
- Jpa @Embedded and @Embeddable
- JPA Attribute Converters
- Hibernate @NotNull vs @Column(nullable = false)
- Defining Unique Constraints in JPA
- JPA Entities and the Serializable Interface
- Hibernate – Mapping Date and Time
- Using Java Records with JPA
- Persisting Enums in JPA
.
.
.
.
.
Entity Relationships
- One-to-One Relationship in JPA
- Many-To-Many Relationship in JPA
- @JoinColumn Annotation Explained
- Difference Between @JoinColumn and mappedBy
- Mapping a Single Entity to Multiple Tables in JPA
- Overview of JPA/Hibernate Cascade Types
- Hibernate @WhereJoinTable Annotation
- Hibernate Inheritance Mapping
- Hibernate One to Many Annotation Tutorial
- Understanding JPA/Hibernate Associations
.
.
.
.
.
Identifiers
- An Overview of Identifiers in Hibernate/JPA
- Composite Primary Keys in JPA
- When Does JPA Set the Primary Key
- Generate UUIDs as Primary Keys With Hibernate
- Returning an Auto-Generated Id with JPA
.
.
.
.
.
Read Operations
- Types of JPA Queries
- JPA Query Parameters Usage
- Constructing a JPA Query Between Unrelated Entities
- Working with Lazy Element Collections in JPA
- JPA Join Types
- FetchMode in Hibernate
- Hibernate Named Query
- Optimistic Locking in JPA
- Pessimistic Locking in JPA
.
.
.
.
.
Query Criteria
- Combining JPA And/Or Criteria Predicates
- Criteria API – An Example of IN Expressions
- JPA Criteria Queries
.
.
.
.
.
Pagination and Sorting
.
.
.
.
.
Query Results
.
.
.
.
.
Write Operations
- INSERT Statement in JPA
- Batch Insert/Update with Hibernate/JPA
- Deleting Objects with Hibernate
- Hibernate: save, persist, update, merge, saveOrUpdate
.
.
.
.
.
















