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:
Emmanuel Bernard 2009-08-10 15:13:12 +00:00
parent 174d09e34b
commit 6e259aa918
1 changed files with 6 additions and 4 deletions

View File

@ -1074,11 +1074,12 @@ public final class HbmBinder {
column.setValue( simpleValue );
column.setTypeIndex( count++ );
bindColumn( columnElement, column, isNullable );
final String columnName = columnElement.attributeValue( "name" );
String logicalColumnName = mappings.getNamingStrategy().logicalColumnName(
columnElement.attributeValue( "name" ), propertyPath
columnName, propertyPath
);
column.setName( mappings.getNamingStrategy().columnName(
logicalColumnName ) );
columnName ) );
if ( table != null ) {
table.addColumn( column ); // table=null -> an association
// - fill it in later
@ -1115,10 +1116,11 @@ public final class HbmBinder {
Column column = new Column();
column.setValue( simpleValue );
bindColumn( node, column, isNullable );
final String columnName = columnAttribute.getValue();
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 ) {
table.addColumn( column ); // table=null -> an association - fill
// it in later