Category "spring-data-jpa"

How to tell what action was taken by the JPA save method

I have a repo: public interface SomeRepository extends CrudRepository<SomeClass, Long> { SomeClass findById(Long id); } and I need to save objects

Fundamentals.How can you use Lazy fetching in Spring+Hibernate+=Vaadin after the session closes

There is the Customer entity which has a one to many relationship to entity Address,so there is a List<Address> getAddress in Customer.Entity Address has

JPA created too many fields in table

enter image description here I am trying to map some entities to tables in MySQL database using Spring Boot JPA. I have a problem with one of the tables because

Spring data repository not found at compile time

I am trying to use Spring data and repositories in a Spring Boot application, but I have an error when compiling the project. Here is my Entity : package fr.i

How to limit result in @Query used in Spring Data Repository

I am retrieving data by CrudRepository in Spring Data JPA. I want to filter my records those are retrieved from my custom query provided in @Query annotation. I

Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

I am using Spring Data JPA and Spring Boot. The layout of the application is this main +-- java +-- com/lapots/game/monolith +-- reposi

getting Caused by: org.hibernate.QueryException: cannot dereference scalar collection element: roles

I have this class , and i'am trying to acess mobileNumbers and roles from the user table , but being lazy intialized i keep getting 'lazy intialization error. I

When does the hibernate session gets closed

I have created the following entities. @Entity public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;

Can't Autowire @Repository annotated interface in Spring Boot

I'm developing a spring boot application and I'm running into an issue here. I'm trying to inject a @Repository annotated interface and it doesn't seem to work

How do I update an entity using spring-data-jpa?

Well the question pretty much says everything. Using JPARepository how do I update an entity? JPARepository has only a save method, which does not tell me if i

Possibly consider using a shorter maxLifetime value - hikari connection pool spring boot

After starting my SpringBoot application, getting an exception on few minutes of the server startup. Did not use any HikariPool Configuration externally, Spring

JPA Repository.findById() returns null but the value is exist on db

I'm developing Spring boot project, using JPA. What I wanna know is repository.findById(id) method returns null, whereas data is available in the DB. Functions

How to set default current date in jpa for mysql

I am trying to generate current date automatically but getting this error You have an error in your SQL syntax; check the manual that corresponds to your MySQL

Postman returns null when using POST (Spring Boot)

** Update Updated the input in Postman: { "firstName": "Thierry", "lastName": "Blossom", "dateOfBirth": "1981-01-20", "email": "thierry@gmai

Composite Primary Key using MongoDB and Spring Data JPA

Could someone tell how to create a composite key in Spring Data JPA using Mongo DB