Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
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 Mihalceawrote: > 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 > 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 : > > > >> 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 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 > >> 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 : > >>> > On 2 August 2017 at 17:07, Gunnar Morling > 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@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
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 Morlingwrote: > > 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 : > >> 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 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 >> 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 : >>> On 2 August 2017 at 17:07, Gunnar Morling 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@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
> 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: > 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 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 > 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 : >> >>> On 2 August 2017 at 17:07, Gunnar Morling 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@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
Because Hibernate's Session extends the JPA EntityManager, any methods Vlad adds to Session effectively "override" the ones from EntityManager - but allows our internals to use "the forward looking" methods regardless of whether the underlying JPA libs are 2.1 or 2.2. On Wed, Aug 2, 2017 at 1:38 PM Sanne Grinoverowrote: > On 2 August 2017 at 18:40, Gunnar Morling wrote: > > Sure, but you may not publish something like an JPA 2.1+ with just some > of > > the 2.2 methods. > > Sure, I never proposed that. Just *asked* some clarifications ;) > > > > > 2017-08-02 17:40 GMT+01:00 Sanne Grinovero : > >> > >> On 2 August 2017 at 17:07, Gunnar Morling 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@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
On 2 August 2017 at 18:40, Gunnar Morlingwrote: > Sure, but you may not publish something like an JPA 2.1+ with just some of > the 2.2 methods. Sure, I never proposed that. Just *asked* some clarifications ;) > > 2017-08-02 17:40 GMT+01:00 Sanne Grinovero : >> >> On 2 August 2017 at 17:07, Gunnar Morling 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@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
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: > On 2 August 2017 at 17:07, Gunnar Morling 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@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
On 2 August 2017 at 17:07, Gunnar Morlingwrote: >> 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@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
> 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. 2017-08-02 16:16 GMT+01:00 Sanne Grinovero: > On 2 August 2017 at 15:21, Vlad Mihalcea wrote: > > Hi, > > > > I plan on adding the JPA 2.2 Query#getResultStream() method since we > > already support streaming and, > > this way, Hibernate 5.2 will work even if the client has a JPA 2.2 > > dependency in their classpath. > > > > https://jcp.org/aboutJava/communityprocess/maintenance/ > jsr338/ChangeLog-JPA-2.2-MR.txt > > > > While we can allow the 6.0 release to be fully JPA 2.2 compliant, is > there > > anyone against adding the aforementioned change in 5.2 as well? > > > > Vlad > > Such a change would break Hibernate Search integration. > > I'm not strictly against it as we can catch up on the Search side, but > it introduces a burden for end users to be aware of which precise > versions they will need: typically we promise that any "micro" in the > same major.minor will be compatible, so we'd be violating this rule. > Anyone not using this method would be unaffected so this seems a very > minor point but I think the "stick to the rules" part is more valuable > to keep people from worrying. > > On which interfaces do you plan adding this method exactly? > > You don't plan on actually updating the JPA API we use at build time right? > > Thanks, > Sanne > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
I don't think it will break anything since the method will be a default one in org.hibernate.query.Query default Stream getResultStream() { return stream(); } That will do it. Vlad On Wed, Aug 2, 2017 at 6:16 PM, Sanne Grinoverowrote: > On 2 August 2017 at 15:21, Vlad Mihalcea wrote: > > Hi, > > > > I plan on adding the JPA 2.2 Query#getResultStream() method since we > > already support streaming and, > > this way, Hibernate 5.2 will work even if the client has a JPA 2.2 > > dependency in their classpath. > > > > https://jcp.org/aboutJava/communityprocess/maintenance/ > jsr338/ChangeLog-JPA-2.2-MR.txt > > > > While we can allow the 6.0 release to be fully JPA 2.2 compliant, is > there > > anyone against adding the aforementioned change in 5.2 as well? > > > > Vlad > > Such a change would break Hibernate Search integration. > > I'm not strictly against it as we can catch up on the Search side, but > it introduces a burden for end users to be aware of which precise > versions they will need: typically we promise that any "micro" in the > same major.minor will be compatible, so we'd be violating this rule. > Anyone not using this method would be unaffected so this seems a very > minor point but I think the "stick to the rules" part is more valuable > to keep people from worrying. > > On which interfaces do you plan adding this method exactly? > > You don't plan on actually updating the JPA API we use at build time right? > > Thanks, > Sanne > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Plan on adding the JPA 2.2 Query#getResultStream() in 5.2
I thought we had agreed in the E.G. to name this method `#stream` rather than `#getResultStream`. I've asked for clarification On Wed, Aug 2, 2017 at 10:02 AM Vlad Mihalceawrote: > Hi, > > I plan on adding the JPA 2.2 Query#getResultStream() method since we > already support streaming and, > this way, Hibernate 5.2 will work even if the client has a JPA 2.2 > dependency in their classpath. > > > https://jcp.org/aboutJava/communityprocess/maintenance/jsr338/ChangeLog-JPA-2.2-MR.txt > > While we can allow the 6.0 release to be fully JPA 2.2 compliant, is there > anyone against adding the aforementioned change in 5.2 as well? > > Vlad > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev