This list includes only modern Hibernate elements while omitting deprecated or outdated features and adding modern ones that were previously omitted.
Modern Hibernate Features
Core Features
- Constraint Transparency
- Automatic Dirty Checking
- Detached Object Support
- Powerful Object-Oriented Query Language (HQL)
- Full Support for Polymorphic Queries
- Criteria API Queries (modern JPA Criteria API)
- Native SQL Queries
- JPQL (Java Persistence Query Language)
-
Object/Relational Mappings
- Flexible Object/Relational Mapping Strategies:
- Single Table per Class Hierarchy
- Table per Subclass
- Table per Concrete Class
- Polymorphic Associations
- Bidirectional Associations
- Association Filtering
- Collections of Basic Types
- Indexed Collections
- Composite Collection Elements
- Support for Immutable Entities
- Support for Entity Graphs
Primary Key Generation
-
Automatic Primary Key Generation
-
Multiple Key Generation Strategies:
- GenerationType.AUTO
- GenerationType.IDENTITY
- GenerationType.SEQUENCE
- GenerationType.TABLE
-
Application-Assigned Identifiers
-
Support for Composite Keys
Object/Relational Mapping Definition
- Annotations-Based Mappings (preferred over XML mappings)
- XML Mapping Documents (still supported but less commonly used)
- Schema Generation with Hibernate Tools
- Support for Programmatic Configuration
Caching Architecture
- Thread Safeness
- Non-Blocking Data Access
- Session-Level Cache
- Second-Level Cache Integration:
- Integration with caching providers like Ehcache, Infinispan, or Redis
- Query Cache for Frequently Used Queries
High-Performance Features
- Lazy Initialization
- Outer Join Fetching
- Batch Fetching
- Support for Optimistic Locking with Versioning/Timestamping
- Highly Scalable Architecture
- No Requirement for Special Database Tables
- Enhanced Fetching Strategies
- SQL Optimization for Specific Dialects
- Integration with Connection Pooling Tools (e.g., HikariCP)
Modern Java Integration
-
Full Java Persistence API (JPA) 2.2+ Support
-
Integration with Dependency Injection Frameworks (e.g., Spring, CDI)
-
Support for Streams and Java 8+ Features
- Functional programming with
Stream
APIs
- Date/Time APIs (
java.time
)
-
Immutable Entities and Embeddables
-
Support for JSON/BLOB Handling
-
Integration with JTA for Distributed Transactions
Advanced Features
- Event Listeners for Lifecycle Management
- Auditing with Envers
-
Support for Multi-Tenancy
- Schema-based Multi-Tenancy
- Discriminator-based Multi-Tenancy
-
Database Vendor-Specific Features
- Native SQL Customizations
- Dialect-Specific Enhancements
- Support for Soft Deletes with Filters
J2EE and Modern Framework Integration
- Full Support for Java EE and Jakarta EE
- JMX Support for Monitoring
- Integration with JCA (Java Connector Architecture)
- Smooth Integration with Java Application Servers (e.g., WildFly, Payara)
This updated list ensures the inclusion of modern Hibernate features while adhering to current standards and best practices.