Questions tagged [spring-data-jpa]

1 votes
0 replies
Spring Boot Data JPA dropping commits with Postgres 9.5
Recently, my application has been seeing commits dropped and I am totally puzzled. No logs, no errors, everything continues as if things would be...
0 votes
2 replies
How to mark entites as cacheable
I have java jar library with JPA entities, spring repositories and spring services and now i included this library in project where i want some e...
0 votes
0 replies
Filter by ManyToOne relation with hibernate
I am trying to create a filter for ManyToOne realtions with hibernate. But i cant figure it out. I am able to filter OneToMany relations with the...
0 votes
0 replies
RESTful webservice with Spring Boot & Data JPA exposing always the active oracle table
I have three Oracle tables: I_SWAP - with two columns (PRODUCTION_TABLE_NAME, BACKUP_TABLE_NAME). This table contain only one record updated da...
0 votes
1 replies
Get Repository for Entity
I have Entities like: @Entity public class Book extends AbstractPersistable { // some fields } and a Repositories like: @Repository publi...
0 votes
1 replies
Column that are combinations of other columns on JPA's entity
My example is, @Entity @Getter @Setter public class MyEntity { private String A; private String B; @JsonIgnore @Column(unique = true) private S...
0 votes
1 replies
How to use my own findById declaration instead of the one by Spring Data?
I'm trying to upgrade spring-boot version to 2.1.2 and we are using Spring data JPA, for DB operations. In many places we are invoking findById(...
0 votes
1 replies
Spring Hibernate @Data update vs raw UPDATE query: Optimistic Lock Exception despite @Transactional?
I am working with Spring Hibernate ORM for Data Management with MYSQL DBMS using my Java Spring application. I have a simple requirement - when s...
1 votes
0 replies
How to specify jhipster filter criteria where request param in url is string but needs to map to enum in backend
I am working on a project that is generated using jhipster. For a given field in an entity, the values are an enum. With filtering enabled on ent...
0 votes
1 replies
spring kafka - Failed to produce message and Transaction Rollback not working - org.apache.kafka.common.errors.ProducerFencedException
spring version : 2.1.4.RELEASE spring kafka : 2.2.5 apache kafka : 1.1.0 zoopkeepr : 3.4.9 framewrok : spring boot I am using ChainedKafkaTra...
0 votes
0 replies
Using BigDecimal field in @Query and populating it with @Param field is throwing Sql Error
This following is the query i am using for setting BigDecimal value in Query but failing as error in SQL Syntax @Query(value="Select f.id,s.stud...
asked 1 month ago
0 votes
1 replies
Data from thymelaf form not saving properly into db
I'm dealing with saving an entity from thymealaf form to database. My current approach. Thymeleaf form in register.html <form action="sa...
0 votes
5 replies
Is it possible to divide the value of a Map into two types?
@Entity @Getter @Setter @NoArgsConstructor public class Notification { @Id private String id; private String name; private Strin...
asked 1 month ago
-1 votes
0 replies
Date gives one day less than actual date while sending from front to backend
Date gives one day less than actual date while sending front End to back-end . I am using angular 5 and spring JPA. Browser param its showing cor...
asked 1 month ago
0 votes
0 replies
Repository find in Hibernate EventListener causes stackoverflow
I have a custom Hibernate event listener. If an entity is dirty the code tries to find old audit entries for that entity. The problem is that it...
asked 1 month ago
0 votes
1 replies
JPA - Could not get primary key generated in a one-to-one relationship
I'm trying to create JPA mappings for following database tables: The fields ID_CODA, ID_MOVEMENT and ID_INFORMATION are generated by sequences...
0 votes
0 replies
Get original entity triggered the Hibernate Event
I'm using Spring Boot 2 with JPA 2 on top of Hibernate. I would like to log some auditing information but not only for the actual entity but also...
asked 1 month ago
2 votes
1 replies
Spring boot data not saved from an event listener
I have a spring boot project in which I am trying to save some data in a MySql table from inside and event listener. I am using Spring boot v1.5...
0 votes
0 replies
spring boot oneToMany relationship problem
How to find the institutes which are belong to a particular region using jpa Queries when the institute table and region table has joined using o...
asked 1 month ago
1 votes
2 replies
Testing unique constraint in @DataJpaTest
I wrote this test to verify unique constraint on Domain.name in the database. But it doesn't work: I expect an exception to be thrown on the doma...
0 votes
1 replies
Using a `CrudRepository` to add a many-to-many relationship by key reference
Using org.springframework.data.repository.CrudRepository, how can I add a many-to-many relationship to another exiting record with only the key r...
asked 1 month ago
0 votes
0 replies
How to send nested json objects to the controller by using ajax
What I am trying to do is passing nested json objects to the controller from where I have to set the field of those entity respectively. I have t...
0 votes
0 replies
spring pagination not retrivieing data for database
Hello I'm using spring data JPA in my sample project,when I use pagination this shows following error,However data insertion and data retrieval(...
asked 1 month ago
0 votes
1 replies
Not a managed type. Spring Boot Tests
Preface: I've been looking for the solution to this answer for months, and have looked at all the answers on SO regarding this, but am yet to fin...
-1 votes
2 replies
Spring boot errir
I have build an spring boot app and connected it to database then I used crudRepository to implement the queries on the database but the app does...