[hibernate-dev] Configuration default values inconsitencies

Vlad Mihalcea mihalcea.vlad at gmail.com
Wed Mar 30 14:39:18 EDT 2016


Sure, I'll add a new one containing the email conclusions and a link to
HHH-10014 and commit it tomorrow.

Vlad

On Wed, Mar 30, 2016 at 9:23 PM, Steve Ebersole <steve at hibernate.org> wrote:

> No.  Never do work under a closed Jira.  That's essentially revising
> history.  Create a new Jira.  You can link that new one to HHH-10014.
>
> On Wed, Mar 30, 2016 at 1:12 PM Vlad Mihalcea <mihalcea.vlad at gmail.com>
> wrote:
>
>> Hi Steve,
>>
>> Should I add those two fixes under the
>> https://hibernate.atlassian.net/browse/HHH-10014 issue?
>> I can do it tomorrow.
>>
>> Vlad
>>
>> On Wed, Mar 30, 2016 at 5:40 PM, Steve Ebersole <steve at hibernate.org>
>> wrote:
>>
>>> The code is wrong in
>>> the GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONS case; the java doc
>>> is correct.  By default we should not be skipping columnDefinitions while
>>> applying global-quoting to be sec compliant.
>>>
>>> In the second case, its the opposite... the javadoc is wrong.
>>> Keyword-quoting should be disabled by default.  Initially I had this
>>> enabled by default, but it caused problems (I forget the details).  I just
>>> forgot to update the javadocs when I switched.
>>>
>>>
>>> On Wed, Mar 30, 2016 at 9:01 AM Vlad Mihalcea <mihalcea.vlad at gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I found an inconsistency in JavaDocs and code:
>>>>
>>>> 1. The GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONS JavaDocs says
>>>>
>>>> "JPA states that column-definitions are subject to global quoting, so by
>>>> default this setting is {@code false} for JPA compliance. Set to {@code
>>>> true} to avoid column-definitions"
>>>>
>>>> While in the code we say the contrary:
>>>>
>>>> private boolean
>>>> globalQuotingSkippedForColumnDefinitions(ConfigurationService
>>>> cfgService) {
>>>>     return cfgService.getSetting(
>>>>
>>>> AvailableSettings.GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONS,
>>>>         StandardConverters.BOOLEAN,
>>>>         // default is true for JPA compliance - DO NOT CHANGE!
>>>>         true
>>>>     );
>>>>   }
>>>>
>>>>
>>>> Andrea Boriero thinks the Javadoc is correct, but the code is wrong
>>>>
>>>
>>> The code
>>>
>>>>
>>>> 2. Another inconsistency:
>>>>
>>>> /**
>>>>  * Specifies whether to automatically quote any names that are deemed
>>>> keywords.  Auto-quoting
>>>>  * is enabled by default.  Set to false to disable.
>>>>  *
>>>>  * @since 5.0
>>>>  */
>>>> String KEYWORD_AUTO_QUOTING_ENABLED = "hibernate.auto_quote_keyword";
>>>>
>>>> This one is said to be enabled by default, but if it's missing:
>>>>
>>>> private static boolean autoKeywordQuoting(ConfigurationService
>>>> cfgService) {
>>>>     return cfgService.getSetting(
>>>>         AvailableSettings.KEYWORD_AUTO_QUOTING_ENABLED,
>>>>         StandardConverters.BOOLEAN,
>>>>         false
>>>>     );
>>>>   }
>>>>
>>>> It's the set to false
>>>>
>>>> I discuss this also with Andrea on HipChat:
>>>>
>>>> Andrea Boriero·12:02 PM
>>>> @VladMihalcea also in this case I think the javadoc is correct, just an
>>>> oversight in the code
>>>> Vlad Mihalcea·12:02 PM
>>>> So we should change the code to match the JavaDoc then
>>>> Andrea Boriero·12:04 PM
>>>> i think so but better to ask Steve before
>>>> Vlad Mihalcea·12:04 PM
>>>> I also think so
>>>> Andrea Boriero·12:10 PM
>>>> for the KEYWORD_AUTO_QUOTING_ENABLED i have found
>>>> https://hibernate.atlassian.net/browse/HHH-10014
>>>> Vlad Mihalcea·12:10 PM
>>>> Ok, so there must be some plan
>>>> Andrea Boriero·12:10 PM
>>>> so probably the code is fine in this case, just the doc is incorrect
>>>>
>>>> Steve, can you confirm that the JavaDoc version is the right one in both
>>>> cases?
>>>>
>>>> Vlad
>>>> _______________________________________________
>>>> 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