HHH-14276 Avoid quoting column name for looking up references during composite identifier second pass

This commit is contained in:
Christian Beikov 2020-11-12 17:52:53 +01:00 committed by Sanne Grinovero
parent 04ade27f07
commit d1ee641e54
1 changed files with 1 additions and 5 deletions

View File

@ -175,11 +175,7 @@ public class CopyIdentifierComponentSecondPass implements SecondPass {
final Ejb3JoinColumn joinColumn; final Ejb3JoinColumn joinColumn;
String logicalColumnName = null; String logicalColumnName = null;
if ( isExplicitReference ) { if ( isExplicitReference ) {
final String columnName = column.getName(); logicalColumnName = column.getName();
logicalColumnName = buildingContext.getMetadataCollector().getLogicalColumnName(
referencedPersistentClass.getTable(),
columnName
);
//JPA 2 requires referencedColumnNames to be case insensitive //JPA 2 requires referencedColumnNames to be case insensitive
joinColumn = columnByReferencedName.get( logicalColumnName.toLowerCase(Locale.ROOT ) ); joinColumn = columnByReferencedName.get( logicalColumnName.toLowerCase(Locale.ROOT ) );
} }