mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 08:35:13 +00:00
HHH-4077 improper use of logicalColumnName
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17257 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
174d09e34b
commit
6e259aa918
@ -1074,11 +1074,12 @@ public static void bindColumns(final Element node, final SimpleValue simpleValue
|
|||||||
column.setValue( simpleValue );
|
column.setValue( simpleValue );
|
||||||
column.setTypeIndex( count++ );
|
column.setTypeIndex( count++ );
|
||||||
bindColumn( columnElement, column, isNullable );
|
bindColumn( columnElement, column, isNullable );
|
||||||
|
final String columnName = columnElement.attributeValue( "name" );
|
||||||
String logicalColumnName = mappings.getNamingStrategy().logicalColumnName(
|
String logicalColumnName = mappings.getNamingStrategy().logicalColumnName(
|
||||||
columnElement.attributeValue( "name" ), propertyPath
|
columnName, propertyPath
|
||||||
);
|
);
|
||||||
column.setName( mappings.getNamingStrategy().columnName(
|
column.setName( mappings.getNamingStrategy().columnName(
|
||||||
logicalColumnName ) );
|
columnName ) );
|
||||||
if ( table != null ) {
|
if ( table != null ) {
|
||||||
table.addColumn( column ); // table=null -> an association
|
table.addColumn( column ); // table=null -> an association
|
||||||
// - fill it in later
|
// - fill it in later
|
||||||
@ -1115,10 +1116,11 @@ else if ( columnElement.getName().equals( "formula" ) ) {
|
|||||||
Column column = new Column();
|
Column column = new Column();
|
||||||
column.setValue( simpleValue );
|
column.setValue( simpleValue );
|
||||||
bindColumn( node, column, isNullable );
|
bindColumn( node, column, isNullable );
|
||||||
|
final String columnName = columnAttribute.getValue();
|
||||||
String logicalColumnName = mappings.getNamingStrategy().logicalColumnName(
|
String logicalColumnName = mappings.getNamingStrategy().logicalColumnName(
|
||||||
columnAttribute.getValue(), propertyPath
|
columnName, propertyPath
|
||||||
);
|
);
|
||||||
column.setName( mappings.getNamingStrategy().columnName( logicalColumnName ) );
|
column.setName( mappings.getNamingStrategy().columnName( columnName ) );
|
||||||
if ( table != null ) {
|
if ( table != null ) {
|
||||||
table.addColumn( column ); // table=null -> an association - fill
|
table.addColumn( column ); // table=null -> an association - fill
|
||||||
// it in later
|
// it in later
|
||||||
|
Loading…
x
Reference in New Issue
Block a user