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

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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to