Java 8 Stream on JpaSpecificationExecutor with @QueryHint fetchSize support [DATAJPA-1438] #1752
Labels
in: core
Issues in core support
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
László Csatlós opened DATAJPA-1438 and commented
Actual method
findAll(Specification<T> spec)
on interfaceJpaSpecificationExecutor<T>
can return only withList
orPage
but not withStream<T>
.This would be useful for huge resultSets combined with
@QueryHint(name="org.hibernate.fetchSize", value="50" )
to truly benefit the power of streaming concept and not to exhaust all of the JVM memory. Hibernate already has the capability to do this withScrollableResults
:If ambiguous method name is a problem (mentioned at DATAJPA-906), then a
Stream<T> streamAll(Specification<T> spec, Long fetchSize)
signiture would also perfect
2 votes, 3 watchers
The text was updated successfully, but these errors were encountered: