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
5
votes
0 answers

Calling stored procedure with JPA - pass a custom object

I have a procedure on Oracle database: TYPE r_age IS RECORD (id VARCHAR2(100), min VARCHAR2(100), max VARCHAR2(100)); TYPE t_ages IS TABLE OF r_age INDEX BY BINARY_INTEGER; PROCEDURE synchronize_ages…
5
votes
1 answer

EventListener Hibernate 5

I am using Hiberante 5 and Spring 4.2.3. I don't find the way to add an eventListener to SessionFactory scope. I just need to set a date before hibernate persists an object. I have sessionFactory defined in spring.xml
angeldev
  • 1,983
  • 3
  • 18
  • 29
5
votes
1 answer

HibernateTemplate is throwing java.lang.NoSuchMethodError: org.hibernate.Session.getFlushMode() -- Spring4.2.6, Hibernate5.2

I have looked around similar postings with SessionFactory and missing Main(). My problem is not related to them. Not sure if any jar is a mismatch. I am trying a sample Spring4.2.6 with Hibernate5.2 code using JDK8 and getting this…
ludwig17
  • 53
  • 1
  • 5
5
votes
2 answers

Where are Hibernate 5 properties documented?

Hibernate 3 and 4 used to document the available configuration…
Bogdan Calmac
  • 7,993
  • 6
  • 51
  • 64
5
votes
3 answers

Hibernate 5 + Glassfish 4.1.1: java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V

When I add Hibernate 5 to my website, I can't get it to work in Glassfish 4.1.1. I always get an error java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V I've tried to replace the jboss-logging library in…
raichu
  • 688
  • 2
  • 8
  • 15
5
votes
1 answer

Replacement for org.hibernate.Transactions.isActive() in Hibernate 5

I'm migrating from hibernate 4.2.17 to 5.0.7 which works fine so far, but it seems that the method isActive is deprecated. I just can't use it anymore. Here's my code: public void starteTransaktion() { try { getMySession(); …
Pascal Petruch
  • 344
  • 3
  • 16
5
votes
0 answers

Hibernate 5, JPA 2.0 websphere

I have been asked to move my application which is currently running on embeded jetty to websphere. I use Hibernate5.0 Spring Java config, Websphere8.5.5. My observations: Websphere uses JPA2.0 and Hibernate 5 uses JPA 2.1, i tried all possible ways…
Naresh
  • 187
  • 5
  • 11
5
votes
3 answers

Hibernate 5 Sequence Generate Issue

I am migrating to hibernate 5 from 3. I am seeing the sequence generator not working properly in Hibernate 5. I have sequence defined with minimum value 1000 and increment by 1. But when I am trying to create a new entity record, I am seeing a…
Sydubabu
  • 181
  • 3
  • 11
5
votes
3 answers

Hibernate 5 ImplicitNamingStrategy

I want to use hibernate 5.x. With hibernate 5.x there are new interfaces for ImplicitNamingStrategy and PhysicalNamingStrategy. For a property name of an entity User I want to have a column name user_name in my database. I do not want to annotate…
Janning Vygen
  • 8,877
  • 9
  • 71
  • 102
5
votes
1 answer

Hibernate 5.0.1 with PostGIS data stored as bytes instead of spatial types

I'm trying to setup a new project with the following combination of technologies Hibernate + spatial 5.0.1 PostgreSQL 9.4 with PostGIS 2.1.8 Spring 4.2.1 JTS 1.13 Entity. I found that org.hibernate.spatial.GeometryType has been removed, and now…
Adam
  • 35,919
  • 9
  • 100
  • 137
5
votes
1 answer

Liquibase + Hibernate ORM 5.0

I'm about to migrate to Hibernate ORM 5.0 and I would like to use Liquibase in my project too. The Liquibase Hibernate Extension mentions liquibase-hibernate4 for Hibernate 4.3+ support. Is there anyone using Liquibase and Hibernate ORM 5.0? I want…
IvanRF
  • 7,115
  • 5
  • 47
  • 71
5
votes
3 answers

Hibernate self-reference entity as non null column

I'm using Hibernate 5 and Spring 3.2.4. I'm deigning a User entity in which I want to include a reference to the user that has created the entity - so a self reference. The self reference itself isn't too problematic, but I want to specify the…
Eric B.
  • 23,425
  • 50
  • 169
  • 316
4
votes
1 answer

Encountered array-valued parameter binding, but was expecting [java.lang.String (n/a)]

I need to generate a query dynamically based on parameter passed and need to join three tables, getting below exception while building query with EntityManager CriteriaBuilder, same code structure is working if I convert it to Criteria but I want…
4
votes
2 answers

Use postgres table sequence instead of sharing hibernate_sequence

When I do anything with a table, it always show the error: Hibernate: select nextval ('hibernate_sequence') 2019-07-20 16:15:44.877 WARN 58376 --- [nio-9000-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 42P01 2019-07-20…
user2606091
  • 203
  • 4
  • 9
4
votes
1 answer

Why is the MappedSuperClass annotation no longer valid in combination with @Inheritance when migrating to Hibernate 5.4.x?

I'm migrating several code bases to use Hibernate 5.4.x instead of Hibernate 5.2.x. For an abstract base class I use @MappedSuperclass @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public abstract class AbstractPersistentJPAObject…
MWiesner
  • 8,868
  • 11
  • 36
  • 70