org.hibernate.query.NativeQuery created from org.hibernate.Session::createNativeQuery used with a parameterList and executed with scroll (doScroll) is broken.
scroll/doScroll resolves to doScroll in org.hibernate.query.internal.NativeQueryImpl and it appears it fetches the QueryParameters from AbstractProducedQuery::getQueryParameters first, then at a later stage it expands it in QueryParameterBindingImpl::expandListValuedParameters.
scroll with setParameterList works in HQL but seems to be broken in SQL,
No 1 from *org.hibernate.query.internal.NativeQueryImpl*
No 2 from *org.hibernate.query.internal.AbstractProducedQuery*
(1) calls getQueryParameters but the expand does not happen until in generareQuerySpecification.
(2) expandListValuedParameters first and afterwards getQueryParameters.
Code have query table/object
Field Long id/bigint iUserId
Results in: Error message: ERROR 2016-08-10 16:12:25,833 org.hibernate.engine.jdbc.spi.SqlExceptionHelper - No value specified for parameter 1.
This affects scroll which is also used in the stream which was added to Query.
Java 8 (1.8.0_92)
mchange c3p0 0.9.5.2