[hibernate-commits] Hibernate SVN: r19432 - core/trunk/core/src/main/java/org/hibernate/cfg.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Sun May 9 14:19:56 EDT 2010
Author: sharathjreddy
Date: 2010-05-09 14:19:56 -0400 (Sun, 09 May 2010)
New Revision: 19432
Modified:
core/trunk/core/src/main/java/org/hibernate/cfg/Configuration.java
Log:
HHH-4647 Problems with @JoinColumn referencedColumnName and quoted column and table names
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/Configuration.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/Configuration.java 2010-05-09 05:46:47 UTC (rev 19431)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/Configuration.java 2010-05-09 18:19:56 UTC (rev 19432)
@@ -2722,7 +2722,7 @@
}
binding.addBinding( logicalName, physicalColumn );
}
-
+
public String getPhysicalColumnName(String logicalName, Table table) throws MappingException {
logicalName = logicalName.toLowerCase();
String finalName = null;
@@ -2733,12 +2733,15 @@
finalName = ( String ) binding.logicalToPhysical.get( logicalName );
}
String key = buildTableNameKey(
- currentTable.getSchema(), currentTable.getCatalog(), currentTable.getName()
+ currentTable.getQuotedSchema(), currentTable.getCatalog(), currentTable.getQuotedName()
);
TableDescription description = ( TableDescription ) tableNameBinding.get( key );
if ( description != null ) {
currentTable = description.denormalizedSupertable;
}
+ else {
+ currentTable = null;
+ }
} while ( finalName == null && currentTable != null );
if ( finalName == null ) {
@@ -2759,12 +2762,15 @@
logical = ( String ) binding.physicalToLogical.get( physicalName );
}
String key = buildTableNameKey(
- currentTable.getSchema(), currentTable.getCatalog(), currentTable.getName()
+ currentTable.getQuotedSchema(), currentTable.getCatalog(), currentTable.getQuotedName()
);
description = ( TableDescription ) tableNameBinding.get( key );
if ( description != null ) {
currentTable = description.denormalizedSupertable;
}
+ else {
+ currentTable = null;
+ }
}
while ( logical == null && currentTable != null && description != null );
if ( logical == null ) {
More information about the hibernate-commits
mailing list