[hibernate-dev] ScrollableResults and 6.0

Yoann Rodiere yoann at hibernate.org
Mon Jan 2 03:35:53 EST 2017


For what it's worth, changing the signature indeed seems appropriate to me:
the fewer object arrays, the better.
Your proposal would require making Query parameterized too, though. I'm not
really up-to-date with the current state of 6.0, but I guess it's already
done or being done.

Anyway, the only think I wanted to say was: if we break the API, maybe we
should try to make sure we won't have to break it again soon. There has
been some discussions about adding scrolling to the JPA spec:
https://java.net/jira/browse/JPA_SPEC-89 . Maybe it would be worth it to
ask for advice on this ticket, so as to limit the risk of having to break
this API again, because the spec would introduce an incompatible signature?
Not sure there would be many reactions, judging by the low activity on the
ticket, but who knows...

Yoann Rodière <yoann at hibernate.org>
Hibernate NoORM Team

On 27 December 2016 at 22:02, Steve Ebersole <steve at hibernate.org> wrote:

> FWIW my inclination is to just change the existing signatures.  6.0 is a
> major release with major changes already wrt querying.
>
>
> On Tue, Dec 27, 2016 at 3:01 PM Steve Ebersole <steve at hibernate.org>
> wrote:
>
> > For 6.0 I'd like to also make ScrollableResults parameterized wrt the
> "row
> > type".  E.g.
> >
> > ScrollableResults<Person> sr = session.createQuery( ..., Person.class
> > ).scroll();
> >
> > However that changes the signature of its methods returning a "row"
> > (currently always defined as Object[]).
> >
> > How would everyone prefer we handle this?  Do I just change the
> signatures
> > of the existing methods?  Or add new methods?
> >
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list