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
3
votes
2 answers

Hibernate OGM provider for Spring configuration

I created a Java application that can use SQL Server or Neo4j as a database without touching the application layer, I just modify the provider and the connection information, like follows:
Avise
  • 91
  • 1
  • 7
3
votes
1 answer

NoSQL Datastore provider: org.hibernate.ogm.datastore.mongodb.impl.MongoDBDatastoreProvider

I am trying to connect to a MongoDB using this persistence.xml file. My mongodb instance is not using any username or password.
HVT7
  • 709
  • 4
  • 13
  • 23
2
votes
0 answers

How to write the JPQL equavalent of db.Person.find({_id:{pid:'1',email:'test@gamil.com'}})

How to convert the mongo db query into JPQL query I have tried the followings but its returning empty list. Query query = manager.createQuery("SELECT p FROM Person p WHERE p.pid =:pid AND p.email =:email"); query.setParameter("pid",…
Saisha
  • 21
  • 4
2
votes
1 answer

JPQL - How can i search entities for key and value (Hibernate OGM (MongoDB) - Map)

I use Hibernate OGM for MongoDB, and mapping simple ShopItem entity with Map: @NamedQueries({ @NamedQuery(name = ShopItem.GET_BY_NAME, query = "select items from ShopItem items where …
Ryazan
  • 23
  • 3
2
votes
1 answer

org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not a subtype

My on-going quest to migrate to Hibernate OGM 5.4 on JBoss WildFly 14.0.0.Final to use with MongoDB. Had it working fine in WildFly 12 & 13 using earlier versions of OGM. Using OGM 5.4, JPA 2.2, Hibernate ORM 5.3 & Hibernate Search 5.10 as per…
NOTiFY
  • 1,255
  • 1
  • 20
  • 36
2
votes
1 answer

EntityManagerHolder cannot be cast to org.springframework.orm.hibernate5.SessionHolder

I'm using this code to configure Spring with Hibernate: @SpringBootApplication @Configuration @EnableTransactionManagement public class ContextServer { @Bean public LocalSessionFactoryBean getSessionFactory() { …
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
2
votes
2 answers

How do I drop a database or collection using Hibernate OGM with MongoDB

I can't drop databases or collections using Hibernate OGM. I've tried using these native queries but an exception is thrown for both entityManagerFactory = Persistence.createEntityManagerFactory("myPersistence-unit"); EntityManager entityManager =…
PotatoMan
  • 53
  • 2
  • 6
2
votes
0 answers

How to completely replace persistence in SpringBoot?

Most amount of information found was in the official docs. I want to replace the JPA provider completely (use Hibernate OGM) One solution would be to create a bean for transactions and a bean with emf. EntityManagerFactory emf =…
Bato-Bair Tsyrenov
  • 1,174
  • 3
  • 17
  • 40
2
votes
1 answer

I declare a List but hibernate instance a Set

I just found out that when I'm going to store in my mongodb, with hibernate ogm, a list this becomes a set (so no repetitions). How can I avoid it? Here's how I declared the field: @ElementCollection private List doubles; For example, I…
user8110728
2
votes
1 answer

Hibernate module error OGM + MongoDB and Wildfly 10

I'm looking for a help to configure Wildfly 10 with Hibernate OGM and MongoDB ... I have the following error: 11:13:17,164 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service…
2
votes
0 answers

spring-boot configure hibernate-ogm for MongoDB

APPLICATION FAILED TO START Description: Cannot determine embedded database driver class for database type NONE Action: If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a…
Hari
  • 131
  • 2
  • 2
  • 6
2
votes
0 answers

JPA QL issue with IS NULL filter for MongoDB in Hibernate OGM

Im using Hibernate OGM with MongoDB. My JPA QL is below: String checkquery = "SELECT p FROM pppoe_test p where p.sourceIP=:source_ip and p.login>:logentrytime and (p.logout>:logentrytime OR p.logout IS NULL)"; I get an error like: no viable…
Vinod
  • 81
  • 9
2
votes
1 answer

Which version of Hibernate-OGM Neo4j dependencies to use?

I'm trying to use Neo4j with Hibernate-OGM. Something is not right with the versions. I either get errors messages like version in the database is expected to be something like v0.A.1 but it's v0.A.5 instead or a NoSuchMethodError or something…
ytg
  • 1,755
  • 2
  • 23
  • 41
2
votes
1 answer

How to create an "unique" contraint in MongoDB through Hibernate OGM and JPA

I'm trying to define a unique constraint on a non-id field. The answer might seem obvious: @Entity @Table(uniqueConstraints=@UniqueConstraint(columnNames={"col1"})) public class MyEntity { ... } However, this is not working. I've checked the…
2
votes
0 answers

Authentication error while trying to connect to MongoDB using Hibernate OGM : OGM001213: MongoDB authentication failed with username

I am trying to connect to MongoDB using Hibernate OGM. My persistance.xml is as follows: org.hibernate.ogm.jpa.HibernateOgmPersistence
tejzpr
  • 945
  • 8
  • 19
1
2
3
15 16