# Hibernate OGM

**URL:** https://discourse.hibernate.org/c/hibernate-ogm/8.md

[Latest](https://discourse.hibernate.org/latest.md) · [Categories](https://discourse.hibernate.org/categories.md)

---

## [Is OGM a dead framework?](https://discourse.hibernate.org/t/is-ogm-a-dead-framework/5716)

<div class="topic-metadata">

**Author:** [@ego](https://discourse.hibernate.org/u/ego)\
**Replies:** 1\
**Last updated:** [November 2, 2021, 10:05am UTC](https://discourse.hibernate.org/t/is-ogm-a-dead-framework/5716 "2021-11-02T10:05:41Z")

</div>

Hi, The latest version of ogm is 2018. Does it means that ogm is dead or you think it has all necessary features ? I’m very interesred by this jpa approach on top of NoSQL databases… Thks for any feedback

---

## [Latest version: 5.4.0.Final (stable)](https://discourse.hibernate.org/t/latest-version-5-4-0-final-stable/25)

<div class="topic-metadata">

**Author:** [@gsmet](https://discourse.hibernate.org/u/gsmet)\
**Replies:** 0\
**Last updated:** [January 2, 2018, 9:32pm UTC](https://discourse.hibernate.org/t/latest-version-5-4-0-final-stable/25 "2018-01-02T21:32:02Z")

</div>

Get it at http://hibernate.org/ogm/releases/ The announcement is: 5.4.0.Final: http://in.relation.to/2018/10/30/hibernate-ogm-5-4-Final-released/

---

## [About the Hibernate OGM category](https://discourse.hibernate.org/t/about-the-hibernate-ogm-category/17)

<div class="topic-metadata">

**Author:** [@gsmet](https://discourse.hibernate.org/u/gsmet)\
**Replies:** 0\
**Last updated:** [December 11, 2017, 10:15am UTC](https://discourse.hibernate.org/t/about-the-hibernate-ogm-category/17 "2017-12-11T10:15:15Z")

</div>

Discussions about Hibernate OGM, the persistence API implementation for NoSQL datastores.

---

## [MongoDB 5.0 support or alternative solution](https://discourse.hibernate.org/t/mongodb-5-0-support-or-alternative-solution/5893)

<div class="topic-metadata">

**Author:** [@Julien\_FERRE](https://discourse.hibernate.org/u/Julien_FERRE)\
**Replies:** 4\
**Last updated:** [June 10, 2025, 7:01am UTC](https://discourse.hibernate.org/t/mongodb-5-0-support-or-alternative-solution/5893 "2025-06-10T07:01:29Z")

</div>

Hi, We need to upgrade from mongodb 3.6 to 5.0. We are using hibernate OGM 5.4 but it seems that it’s not using the proper Mongo Java driver. Do you plan to make an upgrade on OGM or do we have to find alternatives solu…

---

## [Does Hibernate OGM work with Envers?](https://discourse.hibernate.org/t/does-hibernate-ogm-work-with-envers/4314)

<div class="topic-metadata">

**Author:** [@kira\_cesonia](https://discourse.hibernate.org/u/kira_cesonia)\
**Replies:** 11\
**Last updated:** [June 26, 2020, 4:50am UTC](https://discourse.hibernate.org/t/does-hibernate-ogm-work-with-envers/4314 "2020-06-26T04:50:47Z")

</div>

I am looking for a way to version large documents in MongoDB in an efficient way. Since that sounds like something that a framework should exist for. While researching, I came across Envers and Hibernate OGM. I am curre…

---

## [SpringBoot + OGM + MongoDB + Search](https://discourse.hibernate.org/t/springboot-ogm-mongodb-search/5715)

<div class="topic-metadata">

**Author:** [@ego](https://discourse.hibernate.org/u/ego)\
**Replies:** 2\
**Last updated:** [September 18, 2021, 2:12pm UTC](https://discourse.hibernate.org/t/springboot-ogm-mongodb-search/5715 "2021-09-18T14:12:00Z")

</div>

Hi, I’m trying to find a configuration where I can use both SpringBoot, OGM for MongoDB and Hibernate Search My config works with SpringBoot, OGM for MongoDB but I cannot find how to use H. Search. I tried different ve…

---

## [mongoDB hibernate-ogm (5.4.1.Final) remove entity keeps \_id field](https://discourse.hibernate.org/t/mongodb-hibernate-ogm-5-4-1-final-remove-entity-keeps-id-field/5470)

<div class="topic-metadata">

**Author:** [@kem](https://discourse.hibernate.org/u/kem)\
**Replies:** 2\
**Last updated:** [June 24, 2021, 9:08am UTC](https://discourse.hibernate.org/t/mongodb-hibernate-ogm-5-4-1-final-remove-entity-keeps-id-field/5470 "2021-06-24T09:08:48Z")

</div>

I am using hibernate-ogm and Apache Deltaspike Data to save and remove a simple entity in mongoDB. Saving works. But removing an entity, empty all fields except \_id. @Entity public class MyEntity implements Serializabl…

---

## [Connecting Struts, Hibernate OGM with MongoDB](https://discourse.hibernate.org/t/connecting-struts-hibernate-ogm-with-mongodb/5329)

<div class="topic-metadata">

**Author:** [@Ajay\_Dhiman](https://discourse.hibernate.org/u/Ajay_Dhiman)\
**Replies:** 0\
**Last updated:** [May 5, 2021, 6:38am UTC](https://discourse.hibernate.org/t/connecting-struts-hibernate-ogm-with-mongodb/5329 "2021-05-05T06:38:41Z")

</div>

persistance.xml file : \<?xml version="1.0" encoding="UTF-8"?\> \<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocatio…

---

## [Hibernate OGM with MongoDB and SCRAM\_SHA\_256 authentication](https://discourse.hibernate.org/t/hibernate-ogm-with-mongodb-and-scram-sha-256-authentication/4894)

<div class="topic-metadata">

**Author:** [@Anzze](https://discourse.hibernate.org/u/Anzze)\
**Replies:** 0\
**Last updated:** [December 26, 2020, 9:40pm UTC](https://discourse.hibernate.org/t/hibernate-ogm-with-mongodb-and-scram-sha-256-authentication/4894 "2020-12-26T21:40:04Z")

</div>

Hello, I’m using MongoDB with SCRAM\_SHA\_256 authentication mechanism and trying to make it work with Hibernate OGM. It seems however that OGM is not supporting this mechanism, or at least I can’t see valid values for h…

---

## [Is it compatible with spring boot](https://discourse.hibernate.org/t/is-it-compatible-with-spring-boot/4794)

<div class="topic-metadata">

**Author:** [@revooru\_nischal](https://discourse.hibernate.org/u/revooru_nischal)\
**Replies:** 0\
**Last updated:** [November 20, 2020, 10:53am UTC](https://discourse.hibernate.org/t/is-it-compatible-with-spring-boot/4794 "2020-11-20T10:53:36Z")

</div>

Hi , I was reading through your documents and found it very interesting and good. Currently I am building a spring boot application which acts like an infrastructure component. This can connect to multiple databases and…

---

## [hibernate-ogm-mongodb 5.4.0 connection issue](https://discourse.hibernate.org/t/hibernate-ogm-mongodb-5-4-0-connection-issue/4658)

<div class="topic-metadata">

**Author:** [@AMITESH\_RAM](https://discourse.hibernate.org/u/AMITESH_RAM)\
**Replies:** 1\
**Last updated:** [October 9, 2020, 9:53am UTC](https://discourse.hibernate.org/t/hibernate-ogm-mongodb-5-4-0-connection-issue/4658 "2020-10-09T09:53:54Z")

</div>

I am getting the below error when I try to connect to mongodb using hibernate-ogm-mongodb-5.4.0.Final.jar but I am able to connect to mongodb if I use hibernate-ogm-mongodb-5.0.0.Final.jar. Error Details Initial Entity…

---

## [Is OGM project still active?](https://discourse.hibernate.org/t/is-ogm-project-still-active/4578)

<div class="topic-metadata">

**Author:** [@Guy\_Katz](https://discourse.hibernate.org/u/Guy_Katz)\
**Replies:** 4\
**Last updated:** [September 30, 2020, 10:30am UTC](https://discourse.hibernate.org/t/is-ogm-project-still-active/4578 "2020-09-30T10:30:56Z")

</div>

Hi all; I am in the process of undertanding how to utilize JPA with mongo. I have found hibernate OGM a good fit (I am not using spring). whats strage to me is that the last release was around ~2 years ago (5.4.1). is…

---

## [Run Hibernate OGM with WildFly and MongoDB as a beginner](https://discourse.hibernate.org/t/run-hibernate-ogm-with-wildfly-and-mongodb-as-a-beginner/2799)

<div class="topic-metadata">

**Author:** [@SenseiMarv](https://discourse.hibernate.org/u/SenseiMarv)\
**Replies:** 9\
**Last updated:** [June 26, 2019, 3:57pm UTC](https://discourse.hibernate.org/t/run-hibernate-ogm-with-wildfly-and-mongodb-as-a-beginner/2799 "2019-06-26T15:57:40Z")

</div>

Hello, I am currently studying computer science at university and would like to connect a Java application, which I wrote last semester, to a database and run the application on a application server. My choice of datab…

---

## [Hibernate ogm infinispan @manytoone bidirectional issue on wildfly 17](https://discourse.hibernate.org/t/hibernate-ogm-infinispan-manytoone-bidirectional-issue-on-wildfly-17/3693)

<div class="topic-metadata">

**Author:** [@gtbromen](https://discourse.hibernate.org/u/gtbromen)\
**Replies:** 4\
**Last updated:** [March 10, 2020, 9:39am UTC](https://discourse.hibernate.org/t/hibernate-ogm-infinispan-manytoone-bidirectional-issue-on-wildfly-17/3693 "2020-03-10T09:39:31Z")

</div>

I face an issue when i use infinispan ogm with a file-store configuration. My issue is the following. I have deployed on wildfly 17 a very little REST application able to persist and read very simple data model. The da…

---

## [Lose association with infinispan file-store](https://discourse.hibernate.org/t/lose-association-with-infinispan-file-store/3734)

<div class="topic-metadata">

**Author:** [@gtbromen](https://discourse.hibernate.org/u/gtbromen)\
**Replies:** 2\
**Last updated:** [February 12, 2020, 12:57pm UTC](https://discourse.hibernate.org/t/lose-association-with-infinispan-file-store/3734 "2020-02-12T12:57:00Z")

</div>

I have a problem with OGM 5.4.1 infinispan. I have an infinispan file-store configuration. When I restart my application I systematically lose my associations while they are present in the file ASSOCIATION.dat I posted…

---

## [Configuration of two Mongo databases](https://discourse.hibernate.org/t/configuration-of-two-mongo-databases/3442)

<div class="topic-metadata">

**Author:** [@Faizan\_Riaz](https://discourse.hibernate.org/u/Faizan_Riaz)\
**Replies:** 6\
**Last updated:** [November 15, 2019, 1:24pm UTC](https://discourse.hibernate.org/t/configuration-of-two-mongo-databases/3442 "2019-11-15T13:24:40Z")

</div>

Hi, I want to configure two mongo databases. how can I define it in the Persistence.xml file?

---

## [Not able to connect to mongodb using hibernate ogm](https://discourse.hibernate.org/t/not-able-to-connect-to-mongodb-using-hibernate-ogm/3007)

<div class="topic-metadata">

**Author:** [@Dev\_Monitors](https://discourse.hibernate.org/u/Dev_Monitors)\
**Replies:** 1\
**Last updated:** [July 25, 2019, 1:29pm UTC](https://discourse.hibernate.org/t/not-able-to-connect-to-mongodb-using-hibernate-ogm/3007 "2019-07-25T13:29:17Z")

</div>

I am trying to connect to the mongodb using hibernate ogm but unable to do so. user is created from test db (other than admin db) I am using programatic way of configuration this is my code cmonLog.debugLogAlways(cl…

---

## [SQL Support in OGM](https://discourse.hibernate.org/t/sql-support-in-ogm/2855)

<div class="topic-metadata">

**Author:** [@Faizan\_Riaz](https://discourse.hibernate.org/u/Faizan_Riaz)\
**Replies:** 3\
**Last updated:** [June 17, 2019, 10:57am UTC](https://discourse.hibernate.org/t/sql-support-in-ogm/2855 "2019-06-17T10:57:59Z")

</div>

Hi, As I m new to hibernate. So sorry for the stupid question. Can we use SQL database with hibernate OGM bei just changing the configuration or I need to change the complete code. Thanks in advance

---

## [Query with find operation is not working](https://discourse.hibernate.org/t/query-with-find-operation-is-not-working/2828)

<div class="topic-metadata">

**Author:** [@Dev\_Monitors](https://discourse.hibernate.org/u/Dev_Monitors)\
**Replies:** 2\
**Last updated:** [June 14, 2019, 9:07pm UTC](https://discourse.hibernate.org/t/query-with-find-operation-is-not-working/2828 "2019-06-14T21:07:43Z")

</div>

I am trying the following query but hibernate ogm is giving wrong result. db.mycollection.find({“cav\_id” :3},{\_id:0}).count() mongodb shell output is 1 while hibernate ogm’s output 3 This is the result after execut…

---

## [The problems of Eclipse Import ogm](https://discourse.hibernate.org/t/the-problems-of-eclipse-import-ogm/2795)

<div class="topic-metadata">

**Author:** [@xtaqukq](https://discourse.hibernate.org/u/xtaqukq)\
**Replies:** 1\
**Last updated:** [June 6, 2019, 2:52pm UTC](https://discourse.hibernate.org/t/the-problems-of-eclipse-import-ogm/2795 "2019-06-06T14:52:32Z")

</div>

Eclipse 4.11 Maven 3.5 Import Ogm Eclipse Problems

---

## [Change from ORM to OGM](https://discourse.hibernate.org/t/change-from-orm-to-ogm/2757)

<div class="topic-metadata">

**Author:** [@laurameyer2009](https://discourse.hibernate.org/u/laurameyer2009)\
**Replies:** 1\
**Last updated:** [May 29, 2019, 12:22pm UTC](https://discourse.hibernate.org/t/change-from-orm-to-ogm/2757 "2019-05-29T12:22:50Z")

</div>

Hello, i want to change from a SQL to a NoSQL database. How big is the input to change from Hibernate ORM to Hibernate OGM? Thank you so much for your help, Best Laura

---

## [Lazy start mongodb datastore provider](https://discourse.hibernate.org/t/lazy-start-mongodb-datastore-provider/2740)

<div class="topic-metadata">

**Author:** [@Gabor\_Andras](https://discourse.hibernate.org/u/Gabor_Andras)\
**Replies:** 4\
**Last updated:** [May 24, 2019, 5:23am UTC](https://discourse.hibernate.org/t/lazy-start-mongodb-datastore-provider/2740 "2019-05-24T05:23:33Z")

</div>

MongoDBDatastoreProvider class can be enhanced to lazy start so that any dependent application (e.g. war, SpringBoot, etc…) could properly start without requiring a database connection. This can be made configurable by a…

---

## [Is there a way to extend the Hibernate Entity Manager?](https://discourse.hibernate.org/t/is-there-a-way-to-extend-the-hibernate-entity-manager/2608)

<div class="topic-metadata">

**Author:** [@rroyster](https://discourse.hibernate.org/u/rroyster)\
**Replies:** 0\
**Last updated:** [April 15, 2019, 12:43pm UTC](https://discourse.hibernate.org/t/is-there-a-way-to-extend-the-hibernate-entity-manager/2608 "2019-04-15T12:43:49Z")

</div>

I am using hibernate OGM JPA with MongoDB. The problem I am trying to solve is adding operation retry logic to the find, persist, query, remove methods in a JPA environment. The underlying data source driver is the mongo…

---

## [Error org.jboss.modules.xml.XmlPullParserException: Failed to add artifact '${org.hibernate.ogm:hibernate-ogm-core}](https://discourse.hibernate.org/t/error-org-jboss-modules-xml-xmlpullparserexception-failed-to-add-artifact-org-hibernate-ogm-hibernate-ogm-core/2245)

<div class="topic-metadata">

**Author:** [@dij26](https://discourse.hibernate.org/u/dij26)\
**Replies:** 3\
**Last updated:** [February 17, 2019, 10:35am UTC](https://discourse.hibernate.org/t/error-org-jboss-modules-xml-xmlpullparserexception-failed-to-add-artifact-org-hibernate-ogm-hibernate-ogm-core/2245 "2019-02-17T10:35:11Z")

</div>

Hi Guys, I am new in this kind of development and I have troubles to make my OGM (mongoDB) works. I followed this tutorial https://docs.jboss.org/hibernate/stable/ogm/reference/en-US/html\_single/#\_how\_to\_build\_support\_…

---

## [How to create Index](https://discourse.hibernate.org/t/how-to-create-index/2233)

<div class="topic-metadata">

**Author:** [@alfredopacino](https://discourse.hibernate.org/u/alfredopacino)\
**Replies:** 8\
**Last updated:** [February 11, 2019, 2:37pm UTC](https://discourse.hibernate.org/t/how-to-create-index/2233 "2019-02-11T14:37:06Z")

</div>

I have an entity marked as @MappedSuperclass @Table( name = "BigEvent", indexes = { @Index(columnList = "type", name = "type\_idx"), @Index(columnList = "activity\_id", name = "activity\_id\_idx") }) @Inheritance(…

---

## [Could not initialize class org.hibernate.ogm.datastore.mongodb.MongoDBDialect](https://discourse.hibernate.org/t/could-not-initialize-class-org-hibernate-ogm-datastore-mongodb-mongodbdialect/2119)

<div class="topic-metadata">

**Author:** [@alfredopacino](https://discourse.hibernate.org/u/alfredopacino)\
**Replies:** 11\
**Last updated:** [January 28, 2019, 6:08pm UTC](https://discourse.hibernate.org/t/could-not-initialize-class-org-hibernate-ogm-datastore-mongodb-mongodbdialect/2119 "2019-01-28T18:08:10Z")

</div>

I get this error when I simply try to instanciate an EntityManagerFactory. This is the stacktrace Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.ogm.datastore.mongod…

---

## [org.hibernate.HibernateException: OGM000080: Could not load an entity batch](https://discourse.hibernate.org/t/org-hibernate-hibernateexception-ogm000080-could-not-load-an-entity-batch/2148)

<div class="topic-metadata">

**Author:** [@alfredopacino](https://discourse.hibernate.org/u/alfredopacino)\
**Replies:** 5\
**Last updated:** [January 28, 2019, 4:24pm UTC](https://discourse.hibernate.org/t/org-hibernate-hibernateexception-ogm000080-could-not-load-an-entity-batch/2148 "2019-01-28T16:24:30Z")

</div>

I have this class structure: @Entity @Table(name="BigEvent") @DiscriminatorColumn(name = "type") public class GridListEvent extends BigEvent implements Serializable{ @OneToOne(cascade=CascadeType.ALL) @EventBody pri…

---

## [Can't find a codec for class org.hibernate.ogm.datastore.mongodb.type.GridFS](https://discourse.hibernate.org/t/cant-find-a-codec-for-class-org-hibernate-ogm-datastore-mongodb-type-gridfs/2135)

<div class="topic-metadata">

**Author:** [@alfredopacino](https://discourse.hibernate.org/u/alfredopacino)\
**Replies:** 8\
**Last updated:** [January 25, 2019, 8:09pm UTC](https://discourse.hibernate.org/t/cant-find-a-codec-for-class-org-hibernate-ogm-datastore-mongodb-type-gridfs/2135 "2019-01-25T20:09:44Z")

</div>

I need to store big (250k+ pojo objects) lists inside a single mongodb document. The 16MB limit in this case is a huge problem: you will reach the limit with just 30k-40k elements. So I’m trying to experiment with GridF…

---

## [How can i force hibernate to save ipBytes as BINARY type?](https://discourse.hibernate.org/t/how-can-i-force-hibernate-to-save-ipbytes-as-binary-type/2105)

<div class="topic-metadata">

**Author:** [@Lylyhannah](https://discourse.hibernate.org/u/Lylyhannah)\
**Replies:** 1\
**Last updated:** [January 21, 2019, 9:34am UTC](https://discourse.hibernate.org/t/how-can-i-force-hibernate-to-save-ipbytes-as-binary-type/2105 "2019-01-21T09:34:59Z")

</div>

I used hibernate 5.2.12 with mysql database. I have following class (simplified): @Embeddable @Access( AccessType.FIELD ) public class IpAddress implements Serializable,Comparable\<IpAddress\>{ @Column(name = "ip\_ad…

---

## [JPQL doesn't support UPDATE/DELETE?](https://discourse.hibernate.org/t/jpql-doesnt-support-update-delete/1938)

<div class="topic-metadata">

**Author:** [@alfredopacino](https://discourse.hibernate.org/u/alfredopacino)\
**Replies:** 10\
**Last updated:** [January 15, 2019, 4:29pm UTC](https://discourse.hibernate.org/t/jpql-doesnt-support-update-delete/1938 "2019-01-15T16:29:51Z")

</div>

Here https://docs.jboss.org/hibernate/stable/ogm/reference/en-US/html\_single/#ogm-jpql-query is stated JPQL doesn’t currently support update/delete queris? So basically JPQL cannot be used for complete CRUD operations…

[Next page](https://discourse.hibernate.org/c/hibernate-ogm/8.md?page=1)
