Skip to content

Commit 066e13c

Browse files
committed
HHH-9866 - Fix Wrong join table column names generation with globally_quoted_identifiers
1 parent 5049c15 commit 066e13c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hibernate-core/src/main/java/org/hibernate/boot/model/naming/ImplicitNamingStrategyLegacyJpaImpl.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*/
77
package org.hibernate.boot.model.naming;
88

9+
import org.hibernate.dialect.Dialect;
10+
911
/**
1012
* Implementation of the ImplicitNamingStrategy contract which conforms to the
1113
* naming rules initially implemented by Hibernate for JPA 1.0, prior to many
@@ -68,17 +70,16 @@ public Identifier determineJoinColumnName(ImplicitJoinColumnNameSource source) {
6870
// name = transformAttributePath( source.getAttributePath() );
6971
// }
7072
// else if ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION
71-
7273
if ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION
7374
|| source.getAttributePath() == null ) {
7475
name = source.getReferencedTableName().getText()
7576
+ '_'
76-
+ source.getReferencedColumnName();
77+
+ source.getReferencedColumnName().getText();
7778
}
7879
else {
7980
name = transformAttributePath( source.getAttributePath() )
8081
+ '_'
81-
+ source.getReferencedColumnName();
82+
+ source.getReferencedColumnName().getText();
8283
}
8384

8485
return toIdentifier( name, source.getBuildingContext() );

0 commit comments

Comments
 (0)