I've run into a problem while trying to invoke stream() method on query returning javax.persistence.Tuple object. Returned value was object array consisting of single Tuple object instead of just that Tuple object. Attached is changed TupleCriteriaTest with test method testTupleWithStream that will fail.
Problem is caused because getNumberOfTypes() from ScrollableResultsImplementor invoked from ScrollableResultsIterator is returning value > 1 while get() is returning array of length 1.
Changing line in ScrollableResultsIterator from
if ( scrollableResults.getNumberOfTypes() == 1 ) {
to
if ( scrollableResults.get().length == 1 ) {
will solve problem for that particular test case, but I do not know if this can cause problems elsewhere.