Questions tagged [hibernate-5.x]

Hibernate-the object-relational mapping framework for the Java language released new version 5.x with enhanced features like query parser,multi-tenancy improvements,follow-on fetches,OSGi improvements etc.

Hibernate-the object-relational mapping framework for the Java language released new version 5.x with enhanced features like query parser,multi-tenancy improvements,follow-on fetches,OSGi improvements etc.

For more details on Hibernate version 5.x view Hibernate ORM Roadmap

368 questions
0
votes
1 answer

JPQL sort by property on unrelated entity from Repo

I have a query in mind that requires pagination and I want to build it with Spring JPA. I have 3 tables, detail, header, and claim. A header record can have many (children) detail records and has a OneToMany mapping. A claim has no relationship to…
Michael Sampson
  • 369
  • 1
  • 6
  • 19
0
votes
0 answers

hibernate5 assign duplicate ids to the objects

I'm upgrading Hibernate4 to Hibernate5. Spring-4.3.7 And facing the problem that hibernate assigns duplicate IDs to the objects while EntityManager.persist(object) that results in exception :-…
0
votes
1 answer

Hibernate 5 plugin does not consider fileName in configuration

I'm upgrading to Hibernate 5 and found this plugin :- de.jpdigital hibernate5-ddl-maven-plugin
Abhishek-M
  • 410
  • 2
  • 14
0
votes
1 answer

JPA 2.0 Hibernate 4.3/5.x java.lang.ClassNotFoundException: javax.persistence.NamedStoredProcedureQuery

So I ran into the aforementioned ClassNotFoundException. Apparently in the newer versions of hibernate org.hibernate.cfg.AnnotationBinder is dependent on javax.persistence.NamedStoredProcedureQuery. This is correct behaviour if you are using JPA…
pjanssen
  • 1,065
  • 13
  • 35
0
votes
2 answers

How to configure sessionFactory and EntityManager in SpringBoot Application

I have configured datasource in application.yml and added spring-boot-starter-data-jpa in my pom.xml. I am getting the following error while starting the server. "Caused by: java.lang.IllegalStateException: EntityManagerFactory must not be…
SST
  • 2,054
  • 5
  • 35
  • 65
0
votes
1 answer

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.orm.hibernate5.HibernateTrasactionManager]

I'm newer in Spring + Hibernate but I have found problems for deploying my first test. I have found some old post here but I haven't had solution for my problem. This is the error GRAVE:…
barthuin
  • 105
  • 2
  • 12
0
votes
2 answers

how to get ObjectNameNormalizer in hibernate 5

I am trying to upgrade my hibernate version from 3 to 5.0. Can you please advise how to get ObjectNameNormalizer in hibernate 5. My current code is still using Configuration to retrieve session factory which I can't change as we are setting…
Alps
  • 1
  • 3
0
votes
0 answers

Same name column in pk and relation

Hollo, i have the class Rubro:
Emanuel
  • 1
  • 1
0
votes
1 answer

Spring - Hibernate Connection error

When I try to test DAO class with JUnit,it throws following error org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl@1255b1d1 is closed I am using Spring 4 with Hibernate 5, mysql and maven java.lang.IllegalStateException:…
user3252885
0
votes
1 answer

Entity in not mapped

I'm getting exception Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: Building is not mapped [from Building] My Building class mapped @javax.persistence.Entity @Table(name = "building") public…
MolecularMan
  • 227
  • 2
  • 16
0
votes
1 answer

SessionFactory exception

Getting java.lang.IllegalArgumentException: Property 'sessionFactory' is required in my spring boot + hibernate 5 application. I try to autowire it like this @Autowired public void setupSessionFactory(SessionFactory sessionFactory) { …
MolecularMan
  • 227
  • 2
  • 16
0
votes
1 answer

How to inherit @ForeignKey settings when using TABLE_PER_CLASS inheritance strategy

I try to control the foreign key name generation using the @ForeignKey annotation. This usually works well. But in a special case it does not what I want and I don't know how to configure it. The special case is when I use @Inheritance(strategy =…
René Link
  • 48,224
  • 13
  • 108
  • 140
0
votes
1 answer

What Hibernate version does come bundled in Dropwizard and can it be changed?

We have many projects built with Dropwizard, the latest version being used is 1.0.2, we are migrating most of the old code to Java 8, one of the things we want to replace the most is the old Date API and take advantage of the new Java Time API. So…
Uriel Arvizu
  • 1,876
  • 6
  • 37
  • 97
0
votes
1 answer

Grails 3 - use Criteria to find string in list of strings

I have the following domain class and want to find all groups that start with the group name (if a group name is entered) and contain one of the the groupStrings (if a group string is entered): class Group { String name List groupStrings …
Anonymous1
  • 3,877
  • 3
  • 28
  • 42
0
votes
1 answer

Where can I get the map of PersistentClass objects that was under org.hibernate.cfg.Configuration in Hibernate 5?

In Hibernate 3, in the org.hibernate.cfg.Configuration class there is a Map classes property that contains objects of type org.hibernate.mapping.PersistentClass. In a Grails application (which uses hibernate underneath the covers) I was extending a…
Viriato
  • 2,981
  • 7
  • 40
  • 54