HHH-15210 Increase Oracle Dialect MaxIdentifierLength to 128 for 12.2+

This commit is contained in:
Loïc LEFEVRE 2022-04-13 13:24:27 +02:00 committed by Christian Beikov
parent 46b3c10d8f
commit d83128ee85
1 changed files with 5 additions and 3 deletions

View File

@ -1013,13 +1013,15 @@ public class OracleDialect extends Dialect {
@Override @Override
public int getMaxAliasLength() { public int getMaxAliasLength() {
// Max identifier length is 30, but Hibernate needs to add "uniqueing info" so we account for that // Max identifier length is 30 for pre 12.2 versions, and 128 for 12.2+
return 20; // but Hibernate needs to add "uniqueing info" so we account for that
return getVersion().isSameOrAfter( 12, 2 ) ? 118 : 20;
} }
@Override @Override
public int getMaxIdentifierLength() { public int getMaxIdentifierLength() {
return 30; // Since 12.2 version, maximum identifier length is 128
return getVersion().isSameOrAfter( 12, 2 ) ? 128 : 30;
} }
@Override @Override