spring batch - HibernateCursorItemReader with Hibernate Detached criteria -
how use hibernate detached criteria "hibernatecursoritemreader" of spring batch?
a solution following:
- create custom
hibernatedetachedcriteriaitemreader<> extends abstractitemcountingitemstreamitemreader<>
- add property
criteria criteria
, inject before use - rewrite
do*()
functions manage resultset lifecycle
or extends hibernatecursoritemreader
, override doopen() let working in dual-mode (normal,with detached criteria)
Comments
Post a Comment