Top "Spring-data-jpa" questions

Spring Data - JPA is part of the Spring Data umbrella project which makes it easy to implement JPA based repositories

Lombok @Builder and JPA Default constructor

I'm using project Lombok together with Spring Data JPA. Is there any way to connect Lombok @Builder with JPA default …

java spring spring-data-jpa lombok
How to sort by multiple properties in Spring Data (JPA) derived queries?

I'm looking at the examples giving on this page (https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.…

java spring jpa spring-data spring-data-jpa
Spring Data JPA - Multiple EnableJpaRepositories

My application has multiple data sources , so i have created two data source configuration classes based on this URL . But …

spring hibernate jpa spring-data-jpa datasource
How to enable LockModeType.PESSIMISTIC_WRITE when looking up entities with Spring Data JPA?

How can I achieve the equivalent of this code: tx.begin(); Widget w = em.find(Widget.class, 1L, LockModeType.PESSIMISTIC_…

java spring jpa spring-data spring-data-jpa
OneToMany & ManyToOne mapping JPA / Hibernate

I have two tables with foreign key relations. I've tried searching on how to do it and it always leads …

hibernate jpa spring-data-jpa one-to-many many-to-one
Refresh and fetch an entity after save (JPA/Spring Data/Hibernate)

I've these two simple entities Something and Property. The Something entity has a many-to-one relationship to Property, so when I …

java hibernate jpa spring-data-jpa persistence
Missing CrudRepository#findOne method

I am using Spring 5 in my project. Until today there was available method CrudRepository#findOne. But after downloading latest snapshot …

java spring spring-boot spring-data spring-data-jpa
How to generate a ddl creation script with a modern Spring Boot + Data JPA and Hibernate setup?

Currently, I'm using the default @SpringBootApplication annotation with the following properties in application.properties: spring.datasource.url=jdbc:mysql://localhost/…

hibernate spring-boot spring-data spring-data-jpa
Entity Class name is transformed into SQL table name with underscores

I have the following entity defined: @Entity @Table(name = "EmailTemplate") public class EmailTemplate { Despite the table annotation, I receive java.…

spring-boot jpa spring-data-jpa
Select one column using Spring Data JPA

Does anyone have any idea how to get a single column using Spring Data JPA? I created a repository like …

spring spring-boot spring-data-jpa spring-data-rest