Overview
On this page, you can find information about supported and unsupported features in the Hibernate ORM extension. The Hibernate ORM extension supports only MongoDB replica sets. When you use an unsupported feature, the Hibernate ORM extension throws an UnsupportedFeatureException.
You can also find features currently planned for future releases on this page. We will prioritize these upcoming features based on user demand, and you can request support for a feature by creating an AHA idea.
MongoDB Features
This section indicates whether the Hibernate ORM extension supports various MongoDB features.
Data Type Support
To see a list of all BSON types supported in the Hibernate ORM extension, see the MongoDB BSON Fields section in the Create Entities guide.
Query Support
MongoDB Feature | General Availability (GA) Support |
|---|---|
Bulk Writes | ✓ |
Delete Operations | ✓ |
Geospatial Queries | Unsupported. However, the |
Insert Operations | ✓ |
MongoDB Search Queries | Unsupported. However, the |
MongoDB Vector Search Queries | Unsupported. However, the |
Native Querying With MQL | ✓ |
Projections | Partially Supported. Aggregation expressions
within query projections are not supported, and you must
include all entity fields in your projection. |
Read Operations | ✓ |
Update Operations | ✓ |
Upsert Operations | Partially Supported. Upsert operations are supported on unversioned
entities through the |
Database and Collection Support
MongoDB Feature | General Availability (GA) Support |
|---|---|
Change Streams | Unsupported. However, you can use a change stream through the MongoDB Java Driver. To learn more, see the Open Change Streams section in the Java Driver documentation. |
Client-side Field Level Encryption (CSFLE) and Queryable Encryption (QE) | Unsupported. We are considering this feature for future release. However, you can setup CSFLE/QE when you configure the MongoDB Java Driver. To learn more, see the CSFLE documentation in the MongoDB Server manual. |
GridFS | Unsupported. However, you can use GridFS through the MongoDB Java Driver. To learn more, see the Large File Storage with GridFS guide in the Java Driver documentation. |
Time Series Data | Unsupported. However, you can create a time series collection through the MongoDB Java Driver. To learn more, see the Time Series Collections guide in the Java Driver documentation. |
Standalone | Unsupported. We recommended that you convert any standalone instances to a replica set. To learn more, see Convert a Standalone Self-Managed mongod to a Replica Set in the MongoDB Server manual. |
Views | Unsupported. However, you can use the MongoDB Java Driver to define a |
Transactions and Concurrency
MongoDB Feature | General Availability (GA) Support |
|---|---|
Locking | Partially Supported. Optimistic locking is supported on
entities that have a field annotated with |
Transactions | ✓ |
Mapping and Model Support
MongoDB Feature | General Availability (GA) Support |
|---|---|
Associations | Partially Supported. The |
Autogenerating IDs | Partially Supported. Autogenerating ObjectIds is supported. However, you can
manually set |
Composite Primary Keys | Partially Supported. Declare a composite key with
|
Inheritance Strategy | Partially Supported. Single-table inheritance and mapped
superclasses are supported. Does not support the |
| Unsupported. |
Lazy/Eager Fetching | Unsupported. |
Ordering | ✓ |
| Unsupported. The Hibernate ORM extension rejects the |
| ✓ |
Validation | ✓ |
Index Support
MongoDB Feature | General Availability (GA) Support |
|---|---|
Capped Collections | Unsupported. However, you can use the MongoDB Java Driver to define a |
Clustered Collections | Unsupported. However, you can use the MongoDB Java Driver to define a |
Compound Indexes | ✓ |
Embedded Document Indexes | Unsupported. However, you can use the MongoDB Java Driver to define a |
Geospatial Indexes | Unsupported. However, you can use geospatial indexes through the MongoDB Java Driver. To learn more, see the Geospatial Indexes section of the Indexes guide in the Java Driver documentation. |
MongoDB Search Indexes | Unsupported. However, you can use MongoDB Search indexes through the MongoDB Java Driver. To learn more, see the MongoDB Search and Vector Search Indexes section of the Indexes guide in the Java Driver documentation. |
MongoDB Vector Search Indexes | Unsupported. However, you can use MongoDB Vector Search indexes through the MongoDB Java Driver. To learn more, see the MongoDB Search and Vector Search Indexes section of the Indexes guide in the Java Driver documentation. |
Multikey Indexes | Unsupported. However, you can use multikey indexes through the MongoDB Java Driver. To learn more, see the Multikey Indexes (Indexes on Array Fields) section of the Indexes guide in the Java Driver documentation. |
Partial Indexes | Unsupported. However, you can use the MongoDB Java Driver to define a |
Schema Validation | Unsupported. However, you can use the MongoDB Java Driver to define a |
Single Field Indexes | ✓ |
Sparse Indexes | Unsupported. However, you can use the MongoDB Java Driver to define a |
Unique Indexes | ✓ |
Updating Embedded Model Indexes After Model Creation | Unsupported. However, you can drop and recreate the embedded model index manually. |
To learn more about indexes, see the Indexes for Query Optimization guide.
Hibernate ORM Features
This section indicates whether the Hibernate ORM extension supports various Hibernate ORM Features.
Data Type Support
Data Type | General Availability (GA) Support |
|---|---|
Collection Types (List, Set, Maps, Arrays) | ✓ |
Embeddable Entities, Scalar Types | Partially Supported. The |
Embedded Entities, Binary | ✓ |
Embedded Entities, Identifier Types | Partially Supported. Manually set the ID of an entity before persisting an entity. |
Embedded Entities, JSON | ✓ |
Embedded Entities, Null Semantics | ✓ |
Top-level Entities, Binary | ✓ |
Top-level Entities, Identifier Types | ✓ |
Top-level Entities, JSON | ✓ |
Top-level Entities, Null Semantics | ✓ |
Top-level Entities, Scalar Types | ✓ |
Top-level Entities, Temporal Types | Partially Supported. The |
Ternary Logic (True, False, or UNKNOWN) | Unsupported. |
Query Support
Hibernate ORM Feature | General Availability (GA) Support |
|---|---|
HQL and JPQL Queries, Aggregate Operators | ✓ |
HQL and JPQL Queries, Arithmetic Operators | Partially Supported. Supports the To learn more, see the Use Computed Expressions section in the Specify a Query guide. |
HQL and JPQL Queries, Array Operators | ✓ |
HQL and JPQL Queries, CASE Expressions | ✓ |
HQL and JPQL Queries, Datetime Functions | Partially Supported. Supports the |
HQL and JPQL Queries, Comparison Operators |
|
HQL and JPQL Queries, Element Operators | ✓ |
HQL and JPQL Queries, Evaluation Operators | Unsupported. However, the |
HQL and JPQL Queries, | Partially Supported. You can group by a column reference or
by an expression, and filter the grouped results in a
|
HQL and JPQL Queries, JOINS | Partially Supported. You can join entities by navigating a mapped association, as in
|
HQL and JPQL Queries, Logical Operators | ✓ |
HQL and JPQL Queries, String Functions | Partially Supported. Supports the |
Database and Collection Support
Hibernate ORM Feature | General Availability (GA) Support |
|---|---|
First-Level Cache | ✓ |
Second-Level Cache | ✓ |
Framework and Library Support
This section indicates whether the Hibernate ORM extension supports various external frameworks or libraries.
Framework or Library | General Availability (GA) Support |
|---|---|
Spring Boot and Spring Data JPA | Partially Supported. The Hibernate ORM extension provides a Spring Boot starter that configures MongoDB-backed JPA and Spring Data JPA repositories. We do not guarantee support for all Spring Boot or Spring Data features. To learn more, see the Spring Boot and Spring Data JPA Integration section. |