From a8fdb4d2d568e450ab665828ade05014862de3b2 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Thu, 12 Nov 2020 17:52:53 +0100 Subject: [PATCH] HHH-14276 Avoid quoting column name for looking up references during composite identifier second pass --- .../hibernate/cfg/CopyIdentifierComponentSecondPass.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/CopyIdentifierComponentSecondPass.java b/hibernate-core/src/main/java/org/hibernate/cfg/CopyIdentifierComponentSecondPass.java index b6a1795c05ef..9e49149ea2fc 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/CopyIdentifierComponentSecondPass.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/CopyIdentifierComponentSecondPass.java @@ -175,11 +175,7 @@ private Property createSimpleProperty( final Ejb3JoinColumn joinColumn; String logicalColumnName = null; if ( isExplicitReference ) { - final String columnName = column.getName(); - logicalColumnName = buildingContext.getMetadataCollector().getLogicalColumnName( - referencedPersistentClass.getTable(), - columnName - ); + logicalColumnName = column.getName(); //JPA 2 requires referencedColumnNames to be case insensitive joinColumn = columnByReferencedName.get( logicalColumnName.toLowerCase(Locale.ROOT ) ); }