Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Data Jpa generic projection findAll

Acording to https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#projection.dynamic i need to implement generic method findAll, is there any way to do it without @Query annotation? I have tried this way:

<T> List<T> findAll(Class<T> type);

But I'm getting:

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type
like image 666
pustypawel Avatar asked Jan 25 '18 11:01

pustypawel


1 Answers

Problem solved

<T> Set<T> findBy(Class<T> type);

Did work ... :)

like image 70
pustypawel Avatar answered Nov 04 '22 19:11

pustypawel