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
1
vote
1 answer

Migrating Hibernate3 to Hibernate5, Formatter class

How can I edit this piece of code used with hibernate 3 in order to corresponds to hibernate 5.6.1 version. I see that Formatter is now an interface with one single method.
andy
  • 61
  • 6
1
vote
1 answer

Hibernate support for JDBC specification 4.3?

In the docs for Hibernate ORM 5.4 it states that the System Requirements require at least Java 1.8 and JDBC 4.2. The same can be found for the docs for version 6.0. Hibernate 5.2 and later versions require at least Java 1.8 and JDBC 4.2. So is the…
Navigatron
  • 2,065
  • 6
  • 32
  • 61
1
vote
0 answers

Hibernate 5: Count value returned as java.time.Duration instead of java.lang.Long

While trying to fetch Count(*) using Hibernate 5.4.17, the count value (from nativeQuery.uniqueResult() below) is being returned as java.time.Duration, when the same used to be returned as java.lang.Long with Hibernate…
Rohan Bhattacharya
  • 375
  • 1
  • 5
  • 13
1
vote
1 answer

"Could not obtain transaction-synchronized Session for current thread" error in Spring transaction management

I am working on migrating an application from Spring 3.2 to Spring 5. The application uses AWS RDS with a primary database as primary or master datasource and a replica database as read-only datasource. The application creates one session factory (…
mambo
  • 9
  • 1
  • 2
1
vote
0 answers

How to annotate a property so that it is "lazy" but so that it also reacts to entity graphs?

I am learning how to fully control Hibernate behaviour and have hit a roadblock: if I annotate my @ManyToOne entity properties one way they aren't lazy "enough" but if I annotate them differently then entity graphs don't have a desired effect.…
Learner
  • 1,215
  • 1
  • 11
  • 26
1
vote
1 answer

SpringOrm-Hibernate 4 to 5 migration issue - need to mutate metadata before building sessionFactory

I'm trying to upgrade from Hibernate 4.3.11 to 5.4.x with Spring-Orm 4.3.29. As part of the upgrade, I need to migrate existing custom logic that is dependent on NamedSQLQueries retrieved from Hibernate Configuration class. This custom logic mutates…
1
vote
2 answers

Hibernate: getting error to run this SQL query "alter session enable parallel dml" in Hibernate 5.4.x version

I have upgraded Hibernate 4.x version to Hibernate 5.4.x version in my application. I am getting below error while running below SQL query: javax.persistence.TransactionRequiredException: Executing an update/delete query …
user3552342
  • 657
  • 1
  • 5
  • 14
1
vote
0 answers

Hibernate 5 java.lang.NoSuchMethodError: org.hibernate.engine.spi.SessionFactoryImplementor.getProperties()Ljava/util/Map;

I have a legacy application which I am migrating to java 11. After migrating and doing relevant changes, if I run my application is eclipse, it runs fine and gives the desired output. Problem comes when I build the jar and deploy it in an test…
Sourav Roy
  • 63
  • 2
  • 9
1
vote
2 answers

Hibernate 5: using named query with stateless session returning java.lang.UnsupportedOperationException

after we upgrade our project from hibernate 4 to 5, we have been getting this exception where we are trying to get scrollable result from named query with stateless session. so far we have tried googling it and setting parameters but it seems like…
1
vote
0 answers

org.hibernate.tool.hbm2ddl.SchemaUpdate does not add new columns to existing table definitions

We recently upgraded from Hibernate 4.3 to Hibernate 5.4. Previously we used to use invoke the SchemaUpdate in the following manner new SchemaUpdate(sessionFactory.getConfiguration()).execute(false, true); This would create new tables and update…
1
vote
2 answers

What exactly hibernate enableExtendedEnhancement does?

I know this might not be the right place to ask a question like this, but so far enableExtendedEnhancement is not documented and I was not able to find any resources on this topic. Please explain this in detail. Thanks in advance.
1
vote
2 answers

Hibernate custom sequence generator - Table doesn't exist

I'm using a custom class to generate id: public class StringPrefixedSequenceIdGenerator extends SequenceStyleGenerator Also using this class on entity attribute: @Id @GenericGenerator(name = "pipeline_seq_generator", strategy =…
Aldo Inácio da Silva
  • 824
  • 2
  • 14
  • 38
1
vote
1 answer

Unable to found org.hibernate.service.jdbc.dialect.internal.StandardDialectResolver in Hibernate 5.4

I am migrating project from Hibernate 4.2.20 to Hibernate 5.4 version, but I am unable to find the org.hibernate.service.jdbc.dialect.internal.StandardDialectResolver. In fact the package org.hibernate.service.jdbc.XXXXXX is also not available in…
Laxminarayan
  • 188
  • 2
  • 16
1
vote
1 answer

QuerySyntaxException while upgrading to hibernate 5.1

I was working with hibernate 4.3 using annotations and I did not had any mapping issue.I migrated to hibernate 5.1 and I have mapping issues. I check my DAO and query is using same name as that of my entity class that is the solution everyone…
Lilac
  • 580
  • 1
  • 7
  • 25
1
vote
0 answers

C3P0 exhausted after call some @Transactional methods

I've implemented a multi tenant architecture and I've introduced a C3P0 connection pool. By GUI I try to query my application with a simple search form. THis form has a button to call a back end method to extract my result. If I click several times…
Joe Taras
  • 15,166
  • 7
  • 42
  • 55