Hi,

While writing documentation for the new 5.2 Query.stream() API, I realized
that we don't return a Stream<T>, but a Stream<Object[]> which could
confuse users.
This is because ScrollableResultsImpl does something like this:

if ( result != null && result.getClass().isArray() ) {
   currentRow = (Object[]) result;
}
else {
   currentRow = new Object[] {result};
}

The result is the actual entity that we queries, while the currentRow
is an Object[].

I think we might want to change the stream result so that we return
the result for each available entry.

Vlad
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to