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

hibernate 5 and spring - generate ddl using SchemaExport

In hibernate 4 - spring 4 setup it was possible to generate DDL using SchemaExport object: LocalSessionFactoryBean sfb = (LocalSessionFactoryBean) context.getBean("&sessionFactory"); SchemaExport schema = new SchemaExport(sfb.getConfiguration()); …
Jan Zelenka
  • 101
  • 1
  • 6
9
votes
3 answers

Has Hibernate 5 implemented DISCRIMINATOR approach for Multi-tenant data?

According to hibernate 4 doc, the discriminator approach for multi-tenancy data was planned to be implemented on hibernate 5. However hibernate 5 doc is not up to date, it is still telling the same - 'Its support is planned for 5.0'. So is it…
Rafael Rocha
  • 756
  • 9
  • 15
9
votes
3 answers

HIbernate 5: generator class="sequence" not working

I have following mapping: tracksdata_seq Everything went fine when I worked with it…
Green Root
  • 644
  • 2
  • 10
  • 28
8
votes
2 answers

java.time.LocalDate not supported in native queries by latest Spring Data/Hibernate?

Problem: Native queries with Spring Data returning dates return java.sql.Date not java.time.LocalDate, despite the setup. Context: A new project with Spring Boot 2.0.0.M5 (the latest), Hibernate 5.2.11, Hibernate-Java8 5.2.12 (which gives support…
8
votes
2 answers

Where is the "Reverse Engineering" feature in Hibernate5?

I'm upgrading an old project from hibernate3 to hibernate5. The project has a dependency on hbm2java (the so-called reverse engineering tool). In the old project this was executed with mvn hibernate3:hbm2java. Unfortunately, hbm2java is nowhere to…
Alex R
  • 11,364
  • 15
  • 100
  • 180
8
votes
0 answers

how to transform result to map in hibernate5.2

I'm using hibernate5.2 now.I want to transform result to map with native query, but setResultTransformer is deprecated.when i see the doc :@todo develop a new approach to result transformers in the method.so what is the new approach to result…
Sai
  • 81
  • 4
8
votes
1 answer

Java Hibernate Bug Wrong Parameter Binding

I have this simple Hibernate code. public Listbug(){ //SimpleCriteria final Criterion eq = and(Restrictions.eq("fdl","N"),Restrictions.eq("cid",1),Restrictions.eq("did",2)); return currentSession().createCriteria(Student.class) …
chiperortiz
  • 4,751
  • 9
  • 45
  • 79
8
votes
5 answers

Hibernate 4 -> 5 migration: NamingStrategy changes, Tables not found

What i want to do I'm trying to migrate from WildFly 8.2.0 to WildFly 10.0.0 which means that i have (and want) to migrate from Hibernate 4.3 to Hibernate 5.0. Setup Java 8u40 Spring 4.1.9 SQL Server 2012 Wildfly 8.2.0 -> Wildfly 10.0.0 Hibernate…
Robert Niestroj
  • 15,299
  • 14
  • 76
  • 119
8
votes
1 answer

Switching from version 4.3.11.Final to 5.0.1.Final causes compilation error

I am trying to upgrade my Hibernate version from org.hibernate hibernate-core 4.3.11.Final to org.hibernate
Jagger
  • 10,350
  • 9
  • 51
  • 93
8
votes
2 answers

Oracle 12c Identity column with Hibernate 5

I am trying to use Oracle 12c Identity column feature with Hibernate-5.0.0.CR4. I have used the following properties in Spring boot…
Harihar Das
  • 484
  • 3
  • 11
7
votes
1 answer

Hibernate Entity as a static class

I am going through the hibernate 5.2.11.Final Documentation. the link http://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html#basic-lob. I noticed that the example of entity classes in the document is having the…
mnspati
  • 101
  • 1
  • 4
7
votes
1 answer

Hibernate @Enumerated seems to be ignored

I have the class Person mapped with annotations with enum Sex reffering to the sex if is male or female. Let's see: @Entity @Table(name = "PERSON") public class Person { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private…
Nikolas Charalambidis
  • 40,893
  • 16
  • 117
  • 183
7
votes
1 answer

get is not valid without active transaction - hibernate 5

I keep getting this error even though i have started the transaction manually. Session session = HibernateUtil.getSessionFactory().getCurrentSession(); transaction = session.getTransaction(); if(!transaction.isActive()) { transaction =…
pedja
  • 3,285
  • 5
  • 36
  • 48
7
votes
1 answer

how to left join two unrelated entities with JPA criteria api?

using JPA 2.1 and hibernate 5.1.x, this is possible with JPQL select s.lowerBound, l.status ... from Serie s left join Line l on s.lowerBound between l.lineStart and l.lineEnd how do i write this using Criteria api? i attempted this Root
kfc
  • 291
  • 7
  • 24
7
votes
1 answer

Spring 4.3.0.RELEASE, Hibernate 5.0.9.Final, missing SessionFactoryImplementor.getProperties method

I am using Spring 4.3.0.RELEASE together with Hibernate 5.0.9.Final in my app and I keep getting java.lang.NoSuchMethodError: org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Map; If I update the Hibernate 5.2.0.Final,…
Tomas Repel
  • 93
  • 1
  • 8
1 2
3
24 25