Selecting from Multiple Tables in Spring JPA with Pageable and Sorting

Viewed 15538

I saw the Selecting from Multiple Tables in Spring Data already had the solution for multiple tables. I would like to know if it is possible to write custom query that has tables with pageable and sorting feature at the same time in Spring JPA/DATA.

SELECT s.service_id, s.name, us.rating_id 
FROM services s, 
   ratings r, 
   user_services us
where 
   us.service_id = s.service_id and
   us.rating_id = r.rating_id and
   us.user_id= ?
;

Thanks for you help in advance.

1 Answers
Related