Category "spring-data-jpa"

After update to spring boot 2.6.3 from 2.5.X hibernate does not work in some query syntax

someone could help me to solve this bug? i have update spring boot from 2.5.x to 2.6.3 and now the query like: @Query("select count(s.subjectId) from PreChe

When I'm trying to run this query I keep getting this error and I could not figure out why

This is the DTO class public class InvoiceCountValueDto { private String ackNumber; @DateTimeFormat(pattern = "yyyy-MM-dd") @Temporal(TemporalType

Using Enum values in @Query JPQL and @CreationTimestamp hibernate

I am stuck with some problem about using JPQL with spring data Here is my code snippets @Entity @Table //... public class Parent { @Id private Stri

Simple spring data jpa transaction to small table on mysql database is hanging indefinitely

I have a spring data jpa query that reads a row from a mysql table with a pessimistic lock. In my environment, this table only contains one row so it should be

Spring Data JPA (Postgres) - Insert into One table, reading the foreign key from a table that contains static data

I am currently working with Spring Data JPA, specifically Postgres. Our database is highly Normalized. In some scenarios we have some tables that contains stati

why a project that contain spring data dependency doesn't work on tomcat9?

I am trying to deploy a small springboot app on tomcat9 , the tomcat9 is on ubuntu 20 on my account in digital ocean . the problem when i am adding the spring d

JPA Specification, using like againt List<String>

I'm having a problem to use like on List field. Entity class: @Entity public class ToSearch{ @Convert(converter = CollectionConverter.class) private Li

Saving entity with Spring JPA Repository resets enum ttype value

I have an TimelineEntity entity, that uses HoTimelineType enum with custom integer value. That custom integer value is stored in the database. Implemented via U

How to get an object of current user in Spring Boot+JPA

I need to create shopping cart. I have a model CartItem: @Entity @Table(name = "cart_items") public class CartItem { @Id @GeneratedValue(strategy = Generation

Spring JPA not returning Foreign keys in response

I have a database with some entities, ( in parent child relationship )I can say and when When I try to make a query to child table to get all the rows, I only g

JPA @Version behavior when data is changed from unmanaged connection

Enabling @Version on table Customer when running the tests below @Test public void actionsTest1 () throws InterruptedException { CustomerState t = customerS

How to persist List<Object> as jsonb in hibernate

Below the Entity trying to persist : @Data @Entity @Table(name = "REQUEST") @TypeDef(name = "jsonb", typeClass = JsonBinaryType.class) public class Request { @

How to call a stored procedure in Spring Boot?

A query for a stored procedure for multiple delete yield an error message shown way below. CREATE OR REPLACE PROCEDURE delete_dim_page(_page_id bigint) LANGUAG

Ecommerce table problem mapping in hiberate

I have created a product table which has four foreign keys mapping to different tables and creating relationship of ManyToOne. so i created manytoone relationsh

Nesting one-to-one relationship in already owned entity

I'm working on a project with multiple user data mapped to a user by one-to-one relationships in the entities. I'm in the process of adding another entity which

Spring JPA alter table by creating extra column

I am implementing Spring-JPA application . In the model class I am using @Table annotation to map the table with the model class and against the column name usi

Spring Data Jpa @query behaviours

Can anybody please tell me @Query annotation will support DB independence query mechanism Example: public interface UserRepository extends JpaRepository<Us

How to access cross-field values in QueryDSL QuerydslBinderCustomizer?

How can I access other query parameter values inside QuerydslBinderCustomizer? My goal is to create a departure.between(min, max) binding, that I want to derive

Hibernate PessimisticLockingFailureException Occurring at a particular time everyday

I have a Spring Boot application and hibernate exception comes every day at a particular time at night. The exception is : could not execute statement; SQL [n/a

Spring Data JPA - Derived Count Query without filtering

I am trying the methods I've found at: https://www.logicbig.com/tutorials/spring-framework/spring-data/derived-count-query.html I'm trying to learn about what c