Category "hibernate"

Disabling auto commit in Spring boot not worked

I set two parameters to disable auto commit by False but save operation on entity without transaction was committed. spring.datasource.hikari.auto-commit=false

What is the point of @JoinColumn in hibernate?

I know that @JoinColumn is used for creating the foreign key column, but my question is little bit another. I noticed that if I have main entity with mapped by

Disable @CreationTimestamp in testing class

So I'm using Hibernate's annotations @CreationTimestamp and @UpdateTimestamp. It works fine, but I have this case when unit testing where I need to create objec

Nested ID class required to be named like relationship, even though not being a derived identifier?

There's chapter 10 in the book "Pro JPA 2 in Java EE 8", section called "Multiple Mapped Attributes", there the well-known department-project example using @IdC

Hibernate JPA error when inherited form other class

I am trying to have a abstract common class for all my entity. Here is my Entity class and abstract class:- @Entity @MappedSuperclass @Table(name="TBL_EMPLOYEE

Why would hibernate not close its session after select query?

When calling the following method 10 times there are 11 open sessions on the database: public void readHsql() { SessionFactory sessionFactory = getSessi

Spring Boot - Hibernate - Table does not exists

I have a 3rd party jar that holds all the entities and mapping. I am currently using this jar successfully in a classic Spring-MVC application, but now I am t

No qualifying bean of type 'javax.persistence.EntityManagerFactory' available whike upgrading SpringBoot from 2.1.18.RELEASE to 2.6.2

No qualifying bean of type 'javax.persistence.EntityManagerFactory' available whike upgrading SpringBoot from 2.1.18.RELEASE to 2.6.2 @ConditionalOnProperty("sp

Error executing DDL "drop table Player if exists" via JDBC Statement

Creating a spring mvc project with database using java configuration . The application gives error for tables operation like create, drop, alter operation for

Why am i getting timeout exception after 4 requests to database?

I am building quarkus websocket test application with reactive panache connection to postgres. Code: @Slf4j @RequiredArgsConstructor @ServerEndpoint(value = "/a

select query inside loop - Database connections in JPA

In my Spring MVC application, I have @Transactional annotated method inside which I make call(select query) to DAO layer inside for loop. If my input list size

Spring Data JPA / Hibernate "Unable to locate Attribute with the given name"

We have a problem with a Spring Web Application and Hibernate. It is written in Kotlin. We have an abstract Entity @Inheritance(strategy = InheritanceType.JOI

Northwind - creating orders (MySQL + Spring boot)

I have DB with schema like below: I would like to create an Order. I created DAO of Order with all columns like below and added there relations like this: O

No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor

When i try to navigate to an endpoint i get the following error Type definition error: [simple type, class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyIntercep

How to get only those objects whose subarrays in the arrays match the requested one with SQL and Hibernate?

I have Project objects that contain arrays of Tags (for example, Backend, Frontend, Sales, Marketing). The user sets the desired parameters, such as Backend and

Hibernate 6: What is SQM?

In the Hibernate 6.0 Roadmap (https://github.com/hibernate/hibernate-orm/wiki/Roadmap6.0) SQM is mentioned as upcoming. What is SQM? In this roadmap the follo

Integration Eclipse Collections with Spring Data JPA

is it possible integration eclipse collections with spring data jpa + hibernate? for example: import org.springframework.data.jpa.repository.JpaRepository; im

Hibernate prevent locking of records when updating

I have a long process that run on every user in my database and updates the score and hits fields, while this is running, sometimes a user tries to update his n

JAVA - JSON Serialize a list of enum to a class

I have this enum: public enum Days implements Serializable { MONDAY, TUESDAY, WEDNESDAY, ... } I want to use it in a Store class: public cl

CteInsertStrategy can only be used with Dialects that support CTE that can take UPDATE or DELETE statements as well

Hibernate 6.0.1 with PostgreSQL JDBC driver 42.3.5 causes the following exception: java.lang.UnsupportedOperationException: CteInsertStrategy can only be used w