Top "Spring-repositories" questions

This tag is for question related to the use of Spring Data repository abstraction APIs.

Check date between two other dates spring data jpa

I have this model: public class Event { private String name; private Date start; private Date end; } and repository as @Repository …

java spring spring-data-jpa spring-repositories
How to get all results in one page using Spring Data Pagination

I want to get all the results in single page, I've tried with Pageable p = new PageRequest(1, Integer.MAX_VALUE); …

java spring spring-data spring-data-jpa spring-repositories
Spring data repository's method to find by the field of a field

I've two entities, a user and a registered user. A registered user has a field of type user. I would …

java spring hibernate spring-repositories
spring crud repository find top n Items by field A and field B in list order by field C

I have in a Spring Repo something like this: findTop10ItemsByCategIdInOrderByInsertDateDesc(List ids) I want the first 10 items where category …

spring spring-data-jpa spring-repositories
Generate automatically Spring Data Repositories from JPA entities

I have a lot of JPA entities automatically created from a relational database schema. Is there any way to generate …

java spring-boot spring-data spring-data-jpa spring-repositories
Get total count rows for Pageable custom query in Spring repository

I implement pagination like this: List<Products> products = productRepository.findAllProducts(productsRequest.getInitiatorType(), "ACTIVE", new PageRequest(page, 100, Sort.Direction.…

java pagination spring-data-jpa spring-repositories
How to query JPA LocalDateTime field with a LocalDate value?

I search for a way to get a list of Objects created on a certain LocalDateTime date saved in the …

java jpa spring-data-jpa java-time spring-repositories
JpaRepository not saving entity

I have a server using spring boot and spring data jpa. I have two classes annotated with @RestController in my …

java spring-boot jpa spring-data-jpa spring-repositories
How to fix "Field ... required a bean of type ... that could not be found" exception Spring Boot

I am working with spring boot tutorial from javabrains and everything was clear until putting CrudRepository inside project. Below you …

java spring spring-boot spring-repositories
Dynamic query using JpaRepository

I'm trying to get a result of a query using JpaRepository, but it doesn't work for me : public interface PeticionRepository …

java spring spring-data-jpa jpql spring-repositories