HHH-9866 - Fix Wrong join table column names generation with globally_quoted_identifiers
This commit is contained in:
parent
5049c15c0b
commit
066e13cbb5
|
@ -6,6 +6,8 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.boot.model.naming;
|
package org.hibernate.boot.model.naming;
|
||||||
|
|
||||||
|
import org.hibernate.dialect.Dialect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the ImplicitNamingStrategy contract which conforms to the
|
* Implementation of the ImplicitNamingStrategy contract which conforms to the
|
||||||
* naming rules initially implemented by Hibernate for JPA 1.0, prior to many
|
* naming rules initially implemented by Hibernate for JPA 1.0, prior to many
|
||||||
|
@ -68,17 +70,16 @@ public class ImplicitNamingStrategyLegacyJpaImpl extends ImplicitNamingStrategyJ
|
||||||
// name = transformAttributePath( source.getAttributePath() );
|
// name = transformAttributePath( source.getAttributePath() );
|
||||||
// }
|
// }
|
||||||
// else if ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION
|
// else if ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION
|
||||||
|
|
||||||
if ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION
|
if ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION
|
||||||
|| source.getAttributePath() == null ) {
|
|| source.getAttributePath() == null ) {
|
||||||
name = source.getReferencedTableName().getText()
|
name = source.getReferencedTableName().getText()
|
||||||
+ '_'
|
+ '_'
|
||||||
+ source.getReferencedColumnName();
|
+ source.getReferencedColumnName().getText();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
name = transformAttributePath( source.getAttributePath() )
|
name = transformAttributePath( source.getAttributePath() )
|
||||||
+ '_'
|
+ '_'
|
||||||
+ source.getReferencedColumnName();
|
+ source.getReferencedColumnName().getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
return toIdentifier( name, source.getBuildingContext() );
|
return toIdentifier( name, source.getBuildingContext() );
|
||||||
|
|
Loading…
Reference in New Issue