0

Is there any way to add Specification for a custom JPQL query like below : I am able to create custom jpql, but not sure how to add additional specification conditions to it. I need to add specification dynamically.

EmployeeRepository.java

@Query(value = "select new . EmployeePojo(c.employee_id, d.deplt_id) from Employee c left join c.dept d where c.id =1")

Page<EmployeePojo> getData(Pageable request);

I should add specification to above custom jpql

Async Code
  • 51
  • 9
  • Looks like this question has been answered in this post. – TheBrokenToy Apr 08 '19 at 17:29
  • Possible duplicate of [Can I combine a @Query definition and Specifications on one Spring Data JPA repository method?](https://stackoverflow.com/questions/26379522/can-i-combine-a-query-definition-and-specifications-on-one-spring-data-jpa-repo) – Peter Šály Apr 12 '19 at 08:42

0 Answers0