How to use hibernate detached criteria with "HibernateCursorItemReader" of spring batch?
A solution could be the following:
HibernateDetachedCriteriaItemReader<> extends AbstractItemCountingItemStreamItemReader<>
Criteria criteria
and inject it before usedo*()
functions to manage resultset lifecycleOr extends from HibernateCursorItemReader
and override doOpen() to let working in dual-mode (normal,with detached criteria)