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
3
votes
1 answer

what replaces Hibernate.entity() in Hibernate 5

I have an an application in which i want to migrate the jar from hibernate 3.6 to hibernate 5. it is throwing error. The method entity(Class) is undefined for the type Hibernate The code that is i am writing…
3
votes
1 answer

Spatial predicates with Hibernate 5 ORM

I´m migrating an existing application from Hibernate 3.6.10.Final (with hibernate-spatial 1.1.1) to Hibernate 5 ORM, which is supposed to include spatial capabilities. Therefore, I removed the reference to org.hibernatespatial in the pom.xml and…
krause
  • 436
  • 5
  • 24
3
votes
1 answer

Migrating to Hibernate 5.x

I am migrating my application to Hibernate 5 from Hibernate 3. We are using DatabaseMetadata class to get TableMetadata. Hence using TableMetadata object to get DB table column information like column size, type..etc. It seems in Hibernate 5…
Sydubabu
  • 181
  • 3
  • 11
3
votes
1 answer

Understanding hibernate Session Initialization

I'm using Spring 4.2.1 and Hiberante 5 and now trying to understand how spring initializes the Session declared in the Spring Beans Definition as follows:
St.Antario
  • 26,175
  • 41
  • 130
  • 318
3
votes
0 answers

Performance Issue after upgrading to Hibernate 5.0.2 - Tomcat Server start-up time increased

After upgrading Hibernate version from 4.3.9.Final to 5.0.2.Final, Tomcat Server start-up time has increased. After debugging, I realized that hibernate takes too much time in adding mapping locations (*.hbm.xml files) in its metadata sources. I…
Nirav Patel
  • 1,304
  • 2
  • 13
  • 30
3
votes
1 answer

Spring & Hibernate without jpa

For my new project I plan to use Hibernate 5 and Spring 4 and as always like to separate into different layers / projects. Gradle dependencies:…
Nabor
  • 1,661
  • 3
  • 20
  • 45
3
votes
3 answers

UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0)

In the code below when I try to execute Main.java I am getting exception: Exception in thread "main" org.hibernate.UnknownEntityTypeException: Unable to locate persister: com.np.vta.test.pojo.Users at…
Mohammad Faisal
  • 5,783
  • 15
  • 70
  • 117
3
votes
4 answers

Spring 4 and Hibernate 5 method argument validation

How validate incoming arguments with Hibernate ? In XML
Rinat Mukhamedgaliev
  • 5,401
  • 8
  • 41
  • 59
2
votes
0 answers

Querydsl`s JPASQLQuery uses java.sql.Date instead of java.time.LocalDate

I have a simple PostgreSQL table: CREATE TABLE public.test_entity ( id int8 NOT NULL, title varchar NOT NULL, created_at date NOT NULL, CONSTRAINT test_entity_pkey PRIMARY KEY (id) ); Entity for that table and…
2
votes
1 answer

Hibernate 5 Schema-validation: missing table with HBM files

This problem is very similar to one I had before. I am converting an existing non-Spring application from Hibernate 3.x to the very latest 5.6.0.Final (at this time). We are using the MariaDB in AWS and are using the latest MariaDB Driver. We are…
tjholmes66
  • 1,850
  • 4
  • 37
  • 73
2
votes
0 answers

Why can't persist data into database

I am getting: Can not set java.lang.Integer field com.springboot.Model.departmentModel.id to com.springboot.Model.departmentModel in my Spring Boot Project trying to persist data into database... application.properties…
Faheem azaz Bhanej
  • 2,328
  • 3
  • 14
  • 29
2
votes
1 answer

Hibernate - Subclass has to be binded after it's mother class

after upgrading hibernate to from version 4.3.7.Final to 5.3.18.Final I got the error below @Entity @Audited @AuditPermission(Permission.VIEW_INDIVIDUAL) public class Individual implements ITemporalEntity { @Id @Column(name =…
Mina Fawzy
  • 20,852
  • 17
  • 133
  • 156
2
votes
2 answers

java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object; while using JPA 2.2 query.getResultStream().findFirst()

The code of my Spring Data repository method is as follows: public Optional findShipmentLabelByClientIdAndAwb(String clientId, String awb) { String queryString = "select g.shipmentLabel as shipmentLabel from GenericShipment g where…
2
votes
2 answers

Entity update causes error: cascade="all-delete-orphan" was no longer referenced by the owning entity

I have following table entities, In that I am trying update an existing record, while doing so i get following error. I know I'm doing some mistake in the entity definition but not able to figure it out. Appreciate your help. **A …
NivedhaLak
  • 199
  • 1
  • 1
  • 10
2
votes
0 answers

Hibernate 5 SQLServerDialect

I've upgraded an application from grails 2 to grails 3. This also meant an upgrade from hibernate 4 to hibernate 5. As the application is deployed on premise in quite few installations, we've used external-config to avoid migrating configurations…
Anders
  • 181
  • 1
  • 1
  • 13