[hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2

Steve Ebersole steve at hibernate.org
Tue Aug 8 14:55:07 EDT 2017


Lukas refused to change this saying that the outcome of the EG discussion
was inconclusive.  Meh, Hibernate at least will have the better named
methods ;)


On Thu, Aug 3, 2017 at 3:18 AM Vlad Mihalcea <mihalcea.vlad at gmail.com>
wrote:

> I added this Pull Request, and, if it gets approved, we could integrate it
> for 5.2.11
>
> https://github.com/hibernate/hibernate-orm/pull/1973
>
> On Thu, Aug 3, 2017 at 10:47 AM, Gunnar Morling <gunnar at hibernate.org>
> wrote:
>
> > > I've never considered changing the dependencies in any way.
> >
> > Cool, we're all on the same page then.
> >
> > 2017-08-02 21:16 GMT+01:00 Vlad Mihalcea <mihalcea.vlad at gmail.com>:
> >
> >> Sure, but you may not publish something like an JPA 2.1+ with just some
> >>> of the 2.2 methods.
> >>
> >>
> >> I don't understand this part because, for instance, we already support
> >> Java 1.8 Date/Time types for quite some time. So, Hibernate 5.x already
> >> supports JPA 2.1 +.
> >>
> >> The 5.1 Stream support is also in the JPA 2.1+ category too. The only
> >> difference is that the method is called stream and not getStreamResult.
> >>
> >> Now, back to the org.hibernate.query.Query method:
> >>
> >> default Stream<R> getResultStream() {
> >>    return stream();
> >> }
> >>
> >>
> >> Even if the JPA 2.2 define this method, we can still implement it as a
> >> default method and that will work for both JPA 2.1 and JPA 2.2, right?
> >>
> >> I've never considered changing the dependencies in any way. It's just
> >> this method that makes it easier to use Hibernate 5.2 with both JPA 2.1
> and
> >> JPA 2.2 API.
> >>
> >> Vlad
> >>
> >> On Wed, Aug 2, 2017 at 8:40 PM, Gunnar Morling <gunnar at hibernate.org>
> >> wrote:
> >>
> >>> Sure, but you may not publish something like an JPA 2.1+ with just some
> >>> of the 2.2 methods.
> >>>
> >>> 2017-08-02 17:40 GMT+01:00 Sanne Grinovero <sanne at hibernate.org>:
> >>>
> >>>> On 2 August 2017 at 17:07, Gunnar Morling <gunnar at hibernate.org>
> wrote:
> >>>> >> You don't plan on actually updating the JPA API we use at build
> time
> >>>> >> right?
> >>>> >
> >>>> > We cannot do that, you may not provide a version of a spec'ed API
> with
> >>>> > additional methods. It'd have to be in ORM's sub-interface or
> similar.
> >>>>
> >>>> The new spec'ed API already has this method.
> >>>>
> >>>
> >>>
> >>
> >
> _______________________________________________
> 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