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

Upgrading hibernate version to 5.4 gives me 'no transaction is in progress'

I am trying to upgrade spring version(4.3) and hibernate version(5.4) and I am getting 'no transaction is in progress' exception, I am using HibernateTransactionManager and also I have tried with setting hibernate.transaction.coordinator_class to…
0
votes
0 answers

hibernate 5 order of execution in inserting onetoone entities

I have very complex structure with multiple tables to simplify I will post small example I have 4 entities A -> entityId B -> entityId (A- -Onetoone B) C -> entityId (A- -Onetoone C) D -> entityId (A- -Onetoone D) In DB I have constraint of FK for…
0
votes
0 answers

How to lock() a JPA/Hibernate entity when all one has is that entity (no EntityManager/Session)?

I am dealing with some legacy code that, in places, does not have a clean and reliable way of obtaining a JPA EntityManager (or Hibernate Session) for a given entity as needed to invoke a lock(...) method on. Essentially we have a method in an…
Learner
  • 1,215
  • 1
  • 11
  • 26
0
votes
1 answer

Hibernate - Column of Embedded missing in Audit Table

I am using hibernate version 5.3.18.Final but I face an issue with the Embedded object with the Audit table Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [createDate] in table…
Mina Fawzy
  • 20,852
  • 17
  • 133
  • 156
0
votes
1 answer

Using jpa2.2 on Websphere with spring/hibernate

I recently inherited a Spring/Hibernate app, and upgraded it to Spring 5.2.8, SpringSecurity 5.3.4, Hibernate 5.4.21. We are deploying on Websphere 8.5.5 (full, not liberty). When I try to run the application, I get an exception, of which I believe…
simonalexander2005
  • 4,338
  • 4
  • 48
  • 92
0
votes
1 answer

strange behavior [Spring boot upgrade 2.2.2]Getting java.lang.NullPointerException: null at org.hibernate.loader.custom.sql.NamedParamBinder.bind

java.lang.NullPointerException: null at org.hibernate.loader.custom.sql.NamedParamBinder.bind(NamedParamBinder.java:34) at org.hibernate.loader.custom.CustomLoader.bindParameterValues(CustomLoader.java:475) at…
Viral Kondhia
  • 51
  • 1
  • 10
0
votes
1 answer

Hibernate 5: upgrade

I am upgrading to Hibernate 5 from 4. I am getting below error while application startup. org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: FETCH near line 1 The named queries have "fetch first ? rows only", which was working…
Sanjay
  • 165
  • 1
  • 13
0
votes
1 answer

Configuring Hibernate Entity Listeners for only group of entities

As per https://vladmihalcea.com/hibernate-event-listeners/, I would like to configure entity listeners for post insert/update/delete events for my group of entities. I do not want these listeners for all entities in my application. So I created an…
rockycres
  • 71
  • 8
0
votes
0 answers

JPA2 criteria query for @OneToMany relation using a hidden column without a field mapping

I have an entity Instrument with these fields: @OneToMany(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE }) @JoinColumn(referencedColumnName = "instrumentId", nullable = false) public Set getSymbols()…
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
0
votes
0 answers

ClassNotFoundException during Weblogic 12c Java 1.8 EE app deployment while jars are there

I have a Java EE application that runs properly on my local Weblogic instance, but throws seems to be Hibernate 5 related exceptions. The most recent was java.lang.ClassNotFoundException: org.dom4j.io.STAXEventReader at…
0
votes
0 answers

Hibernate 5: lazy object execute query

In my project I have an entity with this property: /** * @return the myObject */ @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "T1_MYOBJECT") public MyObject getMyObject() { return myObject; } When I call method getMyObject() to…
xc93hil
  • 105
  • 1
  • 9
0
votes
1 answer

Hibernate constructing dbmodel takes time if number of keys in jsonb column increases

I have one table with 7 jsonb columns and 13 simple columns. 2 of the jsonb columns have about 15 keys each with composite value data types. Right now the number of rows is around 15k. When i do select * in postgresql , I get the results in 2…
0
votes
1 answer

Flush the session in Grails 4.0.1

In past projects which were using previous versions of Grails/Hibernate I have used in services funciton: private void cleanGorm() { def session = sessionFactory.currentSession session.flush() session.clear() } and for example during…
Michal_Szulc
  • 4,097
  • 6
  • 32
  • 59
0
votes
1 answer

LocalContainerEntityManagerFactoryBean hibernate configuration bean is initialized in a loop

I have my hibernate entity manager factory declared in jpa.xml, hazecast configured in hazelcast.xml and I have domain model setup and I have corresponding componentContext.xml present in the domain model project where my entity manager factory…
user1734698
  • 157
  • 2
  • 2
  • 17
0
votes
0 answers

hibernate not generating insert statement with certain column

I have 3 entities interacting with each other as explained below. Entity_A { @Id private String id; @OneToMany(cascade=CascadeType.ALL, mappedBy="a", orphanRemoval=true) private List b; @OneToMany(cascadeType.ALL,…
Divs
  • 1,578
  • 2
  • 24
  • 51