Hibernate Cheat Sheet
|
This section documents Hibernate ORM 7.4.x (User Guide, Introduction, Query Language Guide, Data Repositories Guide), Jakarta Persistence 3.2, Hibernate Search 8.4.x, and the Hibernate Validator / Hibernate Reactive references — which are the references these pages are written and verified against. This content was generated with the assistance of AI and should be verified against those official docs before being relied on in production. Three older reference books were consulted as bibliography only while preparing these pages and are not the
primary or main source for any page. All three predate Jakarta Persistence 3.2 and Hibernate ORM 6/7 (the
This section’s bibliography lists the reference material consulted while preparing these pages. |
A single-page, printable summary of every concept page in this section — entity lifecycle states,
@GeneratedValue strategies, association/cascade annotations, inheritance strategies, locking modes, the
HQL/JPQL vs. Criteria vs. native-SQL decision, caching layers and CacheConcurrencyStrategy values, key
hibernate./jakarta.persistence. settings, Hibernate Search annotations and the Lucene-vs-Elasticsearch
backend choice, and the Hibernate Reactive/Data-Repositories/Validator essentials — handy for quick
memorization or as a printable desk reference.
For the full explanation, every option, and additional examples, see the dedicated pages:
Getting started — Getting Started and Hibernate & Spring Boot Integration.
Architecture & domain model — Architecture, Entities and Identifiers, Basic and Embeddable Types, Associations, Collections, and Inheritance Mapping.
The persistence context — Persistence Context and Lifecycle, Flushing and Dirty Checking, Transactions, Locking, and Fetching and N+1.
Querying — HQL and JPQL, Criteria API, Native SQL and Stored Procedures, and Bulk Operations and Batching.
Caching, events & advanced mapping — Second-Level Cache, Events, Interceptors, and Filters, Schema Generation and Tooling, Envers Auditing, and Multitenancy.
Performance & the wider Hibernate ecosystem — Performance and Statistics, Integration Testing with Hibernate, Hibernate Search Fundamentals, Hibernate Search Analyzers, Hibernate Search Backends, Integration Testing with Hibernate Search, Hibernate Reactive and Data Repositories, and Validation with Hibernate Validator.