mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-15 07:34:57 +00:00
HHH-9057 Correct ObjectNameNormalizer for mssql-style quoting
This commit is contained in:
parent
514f096061
commit
a9c0fd3243
@ -108,6 +108,12 @@ public String normalizeIdentifierQuoting(String identifier) {
|
||||
return '`' + identifier.substring( 1, identifier.length() - 1 ) + '`';
|
||||
}
|
||||
|
||||
// Convert SQLServer style quoting
|
||||
// TODO: This really should be tied to Dialect#openQuote/closeQuote
|
||||
if ( identifier.startsWith( "[" ) && identifier.endsWith( "]" ) ) {
|
||||
return '`' + identifier.substring( 1, identifier.length() - 1 ) + '`';
|
||||
}
|
||||
|
||||
// If the user has requested "global" use of quoted identifiers, quote this identifier (using back ticks)
|
||||
// if not already
|
||||
if ( isUseQuotedIdentifiersGlobally() && ! ( identifier.startsWith( "`" ) && identifier.endsWith( "`" ) ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user