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 Extension for Hibernate ORM is currently in Public Preview. Public Preview is not recommended for production deployments, because breaking changes might be introduced.
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 | Public Preview Support | General Availability (GA) Support |
|---|---|---|
Bulk Writes | ✓ | ✓ |
Delete operations | ✓ | ✓ |
Geospatial queries | Unsupported. However, the | We are considering this feature for GA release. |
Insert operations | ✓ | ✓ |
MongoDB Search queries | Unsupported. However, the | We are considering this feature for GA release. |
MongoDB Vector Search queries | Unsupported. However, the | We are considering this feature for GA release. |
Native Querying with MQL | Partially Supported. Parameter binding is not supported. | ✓ |
Projections | Partially Supported. Aggregation expressions
within query projections are not supported, and you must include all entity fields in your projection. | Partially Supported. The same aggregation expression and entity field limitations apply. |
Read operations | ✓ | ✓ |
Update operations | ✓ | ✓ |
Upsert operations | Unsupported. However, you can first query the collection to check if the specified value exists, and then insert or update if the value exists. | We are considering this feature for GA release. |
Database and Collection Support
MongoDB Feature | Public Preview Support | General Availability (GA) Support |
|---|---|---|
Change Streams | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Client-side Field Level Encryption (CSFLE) and Queryable Encryption (QE) | Unsupported. However, you can setup CSFLE/QE when you configure the MongoDB Java Driver. | We are considering this feature for GA release. |
GridFS | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Timeseries data | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Views | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Transactions and Concurrency
MongoDB Feature | Public Preview Support | General Availability (GA) Support |
|---|---|---|
Locking | Partially Supported. Optimistic locking is supported. | We are considering this feature for GA release. |
Transactions | ✓ | ✓ |
Mapping and Model Support
MongoDB Feature | Public Preview Support | General Availability (GA) Support |
|---|---|---|
Associations | Unsupported. | ✓ |
Autogenerating IDs | Partially Supported. Autogenerating ObjectIds is supported. However, you can manually set an UUID. | We are considering this feature for GA release. |
Inheritance Strategy | Unsupported. | ✓ |
Lazy/Eager Fetching | Unsupported. | Unsupported. |
Ordering | ✓ | ✓ |
Validation | ✓ | ✓ |
Index Support
MongoDB Feature | Public Preview Support | General Availability (GA) Support |
|---|---|---|
Capped Collections | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Clustered Collections | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Compound indexes | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Embedded document indexes | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Geospatial indexes | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
MongoDB Search indexes | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
MongoDB Vector Search indexes | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Multikey indexes | Unsupported. Use the default MongoDB behavior for array fields. | We are considering this feature for GA release. |
Partial indexes | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Schema Validation | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Single field indexes | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Sparse indexes | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Unique indexes | Unsupported. However, you can use the MongoDB Java Driver to define a | We are considering this feature for GA release. |
Updating embedded model indexes after model creation | Unsupported. However, you can drop and recreate the embedded model index manually. | We are considering this feature for GA release. |
Hibernate ORM Features
This section indicates whether the Hibernate ORM extension supports various Hibernate ORM Features.
Data Type Support
Data Type | Public Preview Support | General Availability (GA) Support |
|---|---|---|
Collection Types (List, Set, Maps, Arrays) | ✓. @ElementCollection and CollectionTable are not supported. However,
collections of embedded structs are supported through embeddable classes annotated
with @Embeddable and @Struct. | ✓. The same @ElementCollection and CollectionTable limitations apply. |
Embeddable Entities, Scalar Types | Partially Supported. The java.time.Instant type is supported for top-level and nested entities. | Partially Supported. The java.time.Instant type is supported for top-level and nested entities. |
Embedded Entities, Binary | ✓ | ✓ |
Embedded Entities, Identifier Types | Partially Supported. Manually set the ID of an entity before persisting an entity. | We are considering this feature for GA release. |
Embedded Entities, JSON | ✓ | ✓ |
Embedded Entities, Null Sematics | ✓ | ✓ |
Top-level Entities, Binary | ✓ | ✓ |
Top-level Entities, Identifier Types | ✓ Manually assign UUIDs before persisting an entity. | ✓ Manually assign UUIDs before persisting an entity. |
Top-level Entities, JSON | ✓ | ✓ |
Top-level Entities, Null Sematics | ✓ | ✓ |
Top-level Entities, Scalar Types | ✓ | ✓ |
Top-level Entities, Temporal Types | Partially Supported. The java.time.Instant type is supported for top-level and nested entities. | Partially Supported. The java.time.Instant type is supported for top-level
and nested entities. |
Ternary Logic (True, False, or UNKNOWN) | Unsupported. | Planned. |
Query Support
Hibernate ORM Feature | Public Preview Support | General Availability (GA) Support |
|---|---|---|
HQL and JPQL Queries, Aggregate Operators | Unsupported. However, the | Planned. |
HQL and JPQL Queries, Arithmetic Operators | Unsupported. However, the | We are considering this feature for GA release. |
HQL and JPQL Queries, Array Operators | ✓ | ✓ |
HQL and JPQL Queries, Comparison Operators | Partially Supported. The operators LIKE, BETWEEN, IN, EXISTS,
ANY, ALL, and IS NULL are not currently supported. However, you can
use the createNativeQuery() method and pass comparison operators in your
MongoDB Query Language statement. To learn more about native queries, see the
Perform Native Database Queries guide. | Planned. |
HQL and JPQL Queries, Element Operators | ✓ | ✓ |
HQL and JPQL Queries, Evaluation Operators | Unsupported. However, the | Planned. |
HQL and JPQL Queries, JOINS | Unsupported. However, you can use the MongoDB Java Driver to define a | Planned. |
HQL and JPQL Queries, Logical Operators | ✓ | ✓ |
Database and Collection Support
Hibernate ORM Feature | Public Preview Support | 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 | Public Preview Support | General Availability (GA) Support |
|---|---|---|
Spring Boot and Spring Data | Partially Supported. We do not guarantee support for all Spring Boot or Spring Data features. See the Spring Data with MongoDB Hibernate App for an example of an app made with the Hibernate ORM extension and Spring Data. | Partially Supported. We do not guarantee support for all Spring Boot or Spring Data features. See the Spring Data with MongoDB Hibernate App for an example of an app made with the Hibernate ORM extension and Spring Data. |