Overview
Hibernate has been in production use for more than two decades and heavily shaped the JPA specification, now Jakarta Persistence. You annotate entity classes, obtain a Session or EntityManager, and Hibernate tracks changes and writes them on flush, with optimistic locking by default, flexible fetching strategies and a two-level cache. HQL is an object-oriented SQL dialect, and Hibernate Processor can validate HQL at compile time.
Hibernate is tested daily on PostgreSQL, MySQL, MariaDB, Db2, Oracle, SQL Server, Sybase ASE, EDB, TiDB, HANA, CockroachDB, H2 and HSQLDB, with built-in Spanner support and community dialects for older databases and incubating SQLite support. It can generate schema DDL, but production teams usually manage migrations with Flyway or Liquibase.
Hibernate ORM 7.0 (19 May 2025) was the first final release under the Apache License 2.0 instead of LGPL 2.1, and moved to Jakarta Persistence 3.2 and Java 17. The 7.4 series, current stable since May 2026, adds temporal and audited entities; 8.0 is in beta for Jakarta Persistence 4.0. Spring Boot 4.1 pairs with Hibernate 7.4.
Pricing and plans
| Plan | Price | What you get |
|---|---|---|
| Hibernate ORM | $0 | Apache 2.0 since 7.0; commercial support available through third parties |
What it does
- Jakarta Persistence
- Full JPA implementation plus Hibernate's native API, usable in Spring Boot, Quarkus, WildFly or plain Java SE.
- HQL and Criteria
- Object-oriented query language with broad ANSI SQL coverage, compile-time validation via Hibernate Processor.
- Caching and fetching
- Tunable fetch strategies and a two-level cache architecture.
- Temporal and audit
- Since 7.4, temporal and audited entities even on databases without native temporal tables.
- Jakarta Data
- Repository-style programming model supported through Hibernate's implementation.
- Wide dialect support
- Built-in dialects for major commercial and open-source databases, plus community dialects.
Strengths and limitations
Strengths
- Very mature, with decades of production use and documentation
- Standard JPA API, so skills transfer between frameworks
- Broad database support including Oracle, Db2 and HANA
- Apache 2.0 licence since 7.0 removes LGPL concerns
Limitations
- Large conceptual surface: sessions, persistence context, lazy loading and flush modes need care to avoid N+1 queries and surprises
- No built-in versioned migration tool; teams add Flyway or Liquibase
- Older series reach end of life quickly (7.0, 7.1 and 7.3 are already end-of-life)
- The relicensing dropped the Teradata dialect and hibernate-ucp module
Who it suits
Good for
- Spring Boot and Quarkus applications
- Enterprise Java systems on Oracle, SQL Server or Db2
- Domain models with inheritance and complex relationships
Look elsewhere if
- Teams that want SQL-first, type-safe query building (jOOQ fits better)
- Small services where a lightweight JDBC wrapper is enough
Pricing history
-
Hibernate ORM 7.0 released
7.0.0.Final shipped as the first final release under Apache 2.0, requiring Java 17 and implementing Jakarta Persistence 3.2. Source ↗
-
Hibernate ORM relicensed from LGPL to Apache 2.0
Hibernate announced ORM is relicensed under Apache 2.0 from 7.0 onwards (7.0.0.Beta5, 21 March 2025, was the first Apache release); 6.x and older stay LGPL 2.1. The Teradata dialect and hibernate-ucp were dropped as a result. Source ↗
Alternatives to Hibernate ORM
| Tool | From | Free option | Stages |
|---|---|---|---|
| SQLAlchemy Python SQL toolkit and ORM | — | ||
| Ent Code-generated Go entity framework | — | ||
| Eloquent ORM Active Record ORM for Laravel | — | ||
| Doctrine ORM Data mapper ORM for PHP | — | ||
| Dapper .NET micro-ORM | — | ||
| TypeORM Decorator-based TypeScript ORM | — |
Questions
What licence is Hibernate ORM under?
Apache License 2.0 since 7.0.0.Beta5 (March 2025); earlier versions remain LGPL 2.1.
Which Hibernate version should I use?
7.4 is the latest stable series as of September 2026; 8.0 is in beta for Jakarta Persistence 4.0.
Does Hibernate handle migrations?
It can generate or update schema, but versioned production migrations are usually done with Flyway or Liquibase.
Sources read for this page