Questions tagged [hibernate-ogm]

Hibernate Object/Grid Mapper (OGM) provides Java Persistence (JPA) support for NoSQL solutions. It reuses Hibernate Core's engine but persists entities into a NoSQL data store instead of a relational database. It allows applications to continue to use Java Persistence Query Language (and Hibernate HQL extensions) to search their data.

From Hibernate OGM Reference Guide Hibernate OGM offers a familiar programming paradigm to deal with NoSQL stores, moves model denormalization from a manual imperative work to a declarative approach handled by the engine and encourages new data usage patterns and NoSQL exploration in more "traditional" enterprises

Hibernate OGM also aims at helping people scale traditional relational databases by providing a NoSQL front-end and keeping the same JPA APIs and domain model.

Related Stack Overflow Question:

Related Tags:

229 questions
0
votes
1 answer

@PrePersist insert query

I'm in the following scenario: I have an Entity managed via JPA in mysql. Some field of the PolyPersistclass are stored in a mysql table, a single field of that entity (PolyPersistData), which contains (pretty big) data is stored in MongoDB using a…
alfredopacino
  • 2,979
  • 9
  • 42
  • 68
0
votes
1 answer

Hibernate OGM - java.lang.StringIndexOutOfBoundsException: String index out of range: -1

I'm not able to retrieve this document in JPQL using the inner id { "_id" : { "activity_id" : NumberLong(1), "id" : NumberLong(629364456) }, "date" : ISODate("2018-12-22T23:41:22.951Z"), "sys_date" :…
alfredopacino
  • 2,979
  • 9
  • 42
  • 68
0
votes
1 answer

Can not find the declaration of element 'persistence' (Eclipselink and HibernateOGM together)

I'm struggling with this problem in days. This code is part of a big project obviously I cannot post it all. I get this error when I instanciate a MyObj object and try to make it persistent in Mysql (first persistence unit) and mongodb (second…
alfredopacino
  • 2,979
  • 9
  • 42
  • 68
0
votes
2 answers

Hibernate OGM mapping @Embeddable objects of native query

How can I read list of @Embeddable objects from MongoDB with Hibernate OGM after aggregation. I have entity like this @javax.persistence.Entity public class MySession implements Serializable { @Id @GeneratedValue(strategy =…
0
votes
1 answer

Hibernate OGM mongodb example

I'm new to java ee, I'm searching for some example of hibernate OGM with Mongodb. I found this: https://github.com/fmarchioni/mastertheboss/tree/master/hibernateogm-mongo but I'm struggling trying to run it. Those are the steps I've done: import…
alfredopacino
  • 2,979
  • 9
  • 42
  • 68
0
votes
1 answer

How to define - environment specifc mongo db configuration in play framework with JpaApi?

I am working on a project where I am using play framework along with mongo db. As of now I have hardcoded the value for local db connection in persistence.xml file and given the jpa.default value as persistenceUnitName and I am using the play's…
plug
  • 13
  • 1
  • 3
0
votes
1 answer

Exception using Hibernate OGM and MongoDB at Entity declaration

I´m not able to initialize my EntityManagerFactory using Hibernate OGM and mongoDB, I´m getting the following Exception: Exception in thread "main" java.lang.ExceptionInInitializerError at…
0
votes
1 answer

Hibernate OGM with MongoDB - ClassNotFoundException when creating EntityManagerFactory

I'm trying to use Hibernate OGM with MongoDB but I have a problem with ClassNotFoundException and NoClassDefFoundError when accessing the database and I don't have any idea why. Here is my code package com.example.model; import…
trjade
  • 170
  • 11
0
votes
0 answers

hibernate-ogm apache ignite does not work

I am still trying to get my head around the whole OGM/Apache Ignite thing, I couldn't find an example on the net that worked. So I tried this pom.xml UTF-8
Tin Ng
  • 937
  • 2
  • 11
  • 25
0
votes
0 answers

tomcat server ignores to load persistence.xml on startup (HIbernate OGM, Mongodb, Spring boot)

I have an spring boot application running fine with in my eclipse which is configured with hibernate ogm and mongodb. when i tried to deploy this project war file in external tomcat it is showing the following error. 26-Jul-2018 18:28:16.155 SEVERE…
Jeevitha
  • 1
  • 3
0
votes
1 answer

Wildfly10 to Wildfly13 hibernate ogm deployment error

Hello I am trying to migrate from WildFly 10 to WildFly 13 and I am facing a problem with hibernate ogm. In wildfly 10 I had hibernate orm 5.1.10 and ogm 5.1.0. Wildfly 13 ships with orm 5.1.14. I have an ear application with a depedency to an ejb…
IsidIoan
  • 403
  • 2
  • 5
  • 13
0
votes
2 answers

Getting "mapping Mongo Converter" error with spring-version 4.2 in spring mvc

I am getting the following error when I run my spring-mvc application with database as mongodb Error creating bean with name 'mappingMongoConverter' defined in ServletContext resource [/WEB-INF/spring-config/mongodb-config.xml]: Bean instantiation…
paul po
  • 99
  • 1
  • 10
0
votes
2 answers

How to use mongodb query in hibernate OGM?

I want to find only the username field in my Registration collection I am using the following query db.Registration.find( {"username":"abcd"}, {username:1, _id:0} ) How will I write this query in hibernate?
paul po
  • 99
  • 1
  • 10
0
votes
0 answers

Using Hibernate OGM, why does String sequence generator create 2 element for each insertion?

I m using this gegnerator public class StringIdGenerator implements IdentifierGenerator { final public static String NAME=StringIdGenerator.class.getSimpleName(); public Serializable generate(SessionImplementor session, Object object)…
0
votes
1 answer

Neo4j - Infinispan combination

Our project is using Neo4j as a long term datastore. We have a use-case to use a data-grid to relieve Neo4j from redundant queries, be able to do queries directly in RAM, and be notified when some data in memory changes. For that, we have seen that…
rico
  • 1,843
  • 2
  • 24
  • 41