Skip to content
Advertisement

Tag: hibernate

Getting null value reference in One to Many mapping in Spingboot

I am trying to implement ONE-to-MANY mapping among two entities. In here designations have a location and a location have many designations. Once I added the designation it mapped fine, but it update the location table with null except id. Here I’m using the Microsoft SQL server. Application Properties DesignationMaster LocationMaster Service class of Designations Controller class of Designation I

How to return a custom response for validation errors using Hibernate Validator and Quarkus

I implemented a REST endpoint in my Quarkus application. For validation purpose I’m using the hibernate-validator. So I added the @Valid annotation to the incoming parameter and added some constraints to that class. Everythings works as expected. When sending a request with invalid data I see a response like this: But I would like to have a more compact response

Unidirectional OneToOne cascading from Child to Parent

I’m in the process of migrating a Hibernate 3 application to Hibernate 5.2. We have a couple of one-to-one unidirectional mappings with cascading (which we can’t make bidirectional because the parent can’t know anything about the other entities). The following (simplified example) worked fine in the latest Hibernate 3.x and latest Hibernate 4.x, but started running into ConstraintViolationExceptions in Hibernate

Execution stuck: Hibernate + Oracle DB with Wallet : DriverManagerConnectionProviderImpl – HHH000115: Hibernate connection pool size: 20 (min=1)

When working with Hibernate and Oracle DB with Wallet. Getting below error: org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl HHH000115: Hibernate connection pool size: 20 (min=1) I am trying currently with Java/JDK: 17 Hibernate: ‘org.hibernate:hibernate-core:5.4.27.Final’ Oracle Autonomous DB: 19c connection via wallet. I tried with different version of JDK(8 and 11) and Hibernate(5.3.xx, 6.4.xx, 5.2.xx). Same error everytime. Answer The issue in my case was because

Advertisement