Open
Description
Anssi Törmä opened DATAJPA-144 and commented
The Specification pattern is useful when complex specifications are combined from simple ones. However, query performance becomes an issue. Possibility to pass query hints to methods of JpaSpecificationExecutor
would be very useful. That is, I would like something along these lines
JpaSpecificationExecutor.findAll(Specification<T>, List<QueryHint>)
JpaSpecificationExecutor.findAll(Specification<T>, Sort, List<QueryHint>)
…
where QueryHint
is a name-value pair. Note that it must be possible to pass multiple hint values with the same name. For example "eclipselink.batch" -> "org.manager", "eclipselink.batch" -> "org.employees".
As a workaround, I've had to create my own JpaSpecificationExecutor
with such methods using the source code in SimpleJpaRepository
7 votes, 6 watchers