Re: [hibernate-dev] Legacy positional params and JPA "positional" params

2017-11-20 Thread Steve Ebersole
I ended up changing the default to 1 for consistency, but adding a setting
`hibernate.query.sql.jdbc_style_params_base` upgrading users can use
temporarily.

On Mon, Nov 20, 2017 at 4:01 AM andrea boriero  wrote:

> I would prefer consistency, but as you pointed out this for users will be
> another upgrade concer , so may be for a 5.3 it is better to mantain the
> zero-based style.
>
> On 18 November 2017 at 19:18, Steve Ebersole  wrote:
>
>> Another thing that comes up is parameters and native queries.  In native
>> queries, all 3 forms are valid: named, jpa-ordinal and jdbc-style.
>>
>> Again historically all positional (jdbc-style) parameters are zero-based.
>> This open up the problem of different bases depending on whether jpa-style
>> or jdbc-style is used.  E.g.
>>
>> session.createNativeQuery( "... where a.name = ?" ).setParameter( 0,
>> "Steve" );
>> session.createNativeQuery( "... where a.name = ?1" ).setParameter( 1,
>> "Steve" );
>>
>> To me its a bit odd to have these different bases.  I understand that
>> because they are different "parameter strategies"  it is easy enough to
>> explain to a user the difference.  But I wonder if that is something we
>> should make consistent to just always assume an ordinal base of 1, i.e.:
>>
>> session.createNativeQuery( "... where a.name = ?" ).setParameter( 1,
>> "Steve" );
>> session.createNativeQuery( "... where a.name = ?1" ).setParameter( 1,
>> "Steve" );
>>
>> The only down side to this is yet another upgrade concern for users.
>>
>> Thoughts?
>>
>> On Fri, Nov 17, 2017 at 12:15 PM Sanne Grinovero 
>> wrote:
>>
>> > +1 I see no problem either.
>> >
>> >
>> > On 17 November 2017 at 15:57, Steve Ebersole 
>> wrote:
>> > > Actually its possible that the TCK always tested it and merging
>> > > `javax.persistence.Query` and `org.hibernate.query.Query` may be the
>> > > culprit.  But either way, the net result is the same...
>> > >
>> > > On Fri, Nov 17, 2017 at 8:44 AM Steve Ebersole 
>> > wrote:
>> > >
>> > >> I wont bore everyone with the history here, but long story short is
>> that
>> > >> we need to start treating JPA "positional" parameters as positional
>> in
>> > the
>> > >> `javax.persistence.Parameter#getPosition` sense.  Even though there
>> is
>> > >> nothing positional about JPA's positional parameters, this has moved
>> > from a
>> > >> philosophical discussion to a practical one as the JPA 2.2 TCK is
>> > testing
>> > >> this, whereas older ones did not
>> > >>
>> > >> To do that however, we need to drop our older positional parameter
>> > >> support.  That feature has been deprecated for quite some time now.
>> > Unless
>> > >> there are objections, I will plan on dropping that in 5.3
>> > >>
>> > > ___
>> > > 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
>>
>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] JDK 10 b29 Early Access is available on jdk.java.net

2017-11-20 Thread Gunnar Morling
Hi Dalibor,

2017-11-20 10:24 GMT+01:00 dalibor topic :

>
>
> On 19.11.2017 13:03, Gunnar Morling wrote:
>
>> Hi Rory,
>>
>> While updating my JDK API change report generator [1] for JDK 10, I
>> noticed that three modules aren't available in JDK 10 as of b32 which
>> existed in JDK 9:
>>
>> * jdk.management.cmm
>> * jdk.management.jfr
>> * jdk.management.resource
>>
>
> Hi Gunnar,
>
> the modules are there for (still) commercial features like the Java Flight
> Recorder. Commercial features not made available in JDK early access builds.
>

I see, thanks.

But why is then that other modules also marked as commercial in their
JavaDoc are part of the EA build (e.g. "jdk.jfr")? And why are the
non-available modules nevertheless parts of the API docs published at
http://download.java.net/java/jdk10/docs/api? It seems a bit inconsistent.

Really looking forward to the open-sourced JFR + MC btw., that's a
fantastic development!


>
> cheers,
> dalibor topic
>
>
>> Interestingly, these modules are contained in the published JDK 10
>> JavaDoc [3], but I couldn't find the jmod files in the "jmods" directory of
>> the preview build.
>>
>> Thanks,
>>
>> --Gunnar
>>
>> [1] https://github.com/gunnarmorling/jdkapidiff
>> [2] http://jdk.java.net/10/release-notes
>> [3] http://download.java.net/java/jdk10/docs/api/jdk.management.
>> cmm-summary.html
>>
>>
>>
>>
>> 2017-11-03 11:20 GMT+01:00 Rory O'Donnell > >:
>>
>> Hi Sanne,
>>
>> JDK 10 Early Access  build 29 is available at : - jdk.java.net/10/
>> 
>>
>>
>> JDK 10 Early Access Release Notes are available [1]
>>
>> JDK 10 Schedule, Status & Features are available [2]
>>
>>
>>Notes
>>
>>* OpenJDK EA binaries will be available at a later date.
>>* Oracle has proposed: Newer version-string scheme for the Java SE
>>  Platform and the JDK
>>o Please see Mark Reinhold's proposal [3] , feedback via the
>>  mailing list to Mark please.
>>
>> > >
>>
>> Feedback - If you have suggestions or encounter bugs, please submit
>> them
>> using the usual Java SE bug-reporting channel.
>> Be sure to include complete version information from the output of the
>> |java --version| command.
>>
>> Regards,
>> Rory
>>
>> [1] http://jdk.java.net/10/release-notes
>> 
>> [2] http://openjdk.java.net/projects/jdk/10/
>> 
>> [3]
>> http://mail.openjdk.java.net/pipermail/jdk-dev/2017-November
>> /89.html
>> > r/89.html>
>>
>> --
>> Rgds,Rory O'Donnell
>> Quality Engineering Manager
>> Oracle EMEA , Dublin, Ireland
>>
>> ___
>> hibernate-dev mailing list
>> hibernate-dev@lists.jboss.org 
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>> 
>>
>>
>>
> --
>  Dalibor Topic | Principal Product Manager
> Phone: +494089091214  | Mobile: +491737185961
> 
>
> ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg
>
> ORACLE Deutschland B.V. & Co. KG
> Hauptverwaltung: Riesstr. 25, D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>
>  Oracle is committed to developing
> practices and products that help protect the environment
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Re: [hibernate-dev] Legacy positional params and JPA "positional" params

2017-11-20 Thread andrea boriero
I would prefer consistency, but as you pointed out this for users will be
another upgrade concer , so may be for a 5.3 it is better to mantain the
zero-based style.

On 18 November 2017 at 19:18, Steve Ebersole  wrote:

> Another thing that comes up is parameters and native queries.  In native
> queries, all 3 forms are valid: named, jpa-ordinal and jdbc-style.
>
> Again historically all positional (jdbc-style) parameters are zero-based.
> This open up the problem of different bases depending on whether jpa-style
> or jdbc-style is used.  E.g.
>
> session.createNativeQuery( "... where a.name = ?" ).setParameter( 0,
> "Steve" );
> session.createNativeQuery( "... where a.name = ?1" ).setParameter( 1,
> "Steve" );
>
> To me its a bit odd to have these different bases.  I understand that
> because they are different "parameter strategies"  it is easy enough to
> explain to a user the difference.  But I wonder if that is something we
> should make consistent to just always assume an ordinal base of 1, i.e.:
>
> session.createNativeQuery( "... where a.name = ?" ).setParameter( 1,
> "Steve" );
> session.createNativeQuery( "... where a.name = ?1" ).setParameter( 1,
> "Steve" );
>
> The only down side to this is yet another upgrade concern for users.
>
> Thoughts?
>
> On Fri, Nov 17, 2017 at 12:15 PM Sanne Grinovero 
> wrote:
>
> > +1 I see no problem either.
> >
> >
> > On 17 November 2017 at 15:57, Steve Ebersole 
> wrote:
> > > Actually its possible that the TCK always tested it and merging
> > > `javax.persistence.Query` and `org.hibernate.query.Query` may be the
> > > culprit.  But either way, the net result is the same...
> > >
> > > On Fri, Nov 17, 2017 at 8:44 AM Steve Ebersole 
> > wrote:
> > >
> > >> I wont bore everyone with the history here, but long story short is
> that
> > >> we need to start treating JPA "positional" parameters as positional in
> > the
> > >> `javax.persistence.Parameter#getPosition` sense.  Even though there
> is
> > >> nothing positional about JPA's positional parameters, this has moved
> > from a
> > >> philosophical discussion to a practical one as the JPA 2.2 TCK is
> > testing
> > >> this, whereas older ones did not
> > >>
> > >> To do that however, we need to drop our older positional parameter
> > >> support.  That feature has been deprecated for quite some time now.
> > Unless
> > >> there are objections, I will plan on dropping that in 5.3
> > >>
> > > ___
> > > 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
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev