[hibernate-commits] Hibernate SVN: r19882 - core/branches/Branch_3_5/core/src/main/java/org/hibernate/cfg.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu Jul 1 07:25:54 EDT 2010


Author: sharathjreddy
Date: 2010-07-01 07:25:53 -0400 (Thu, 01 Jul 2010)
New Revision: 19882

Modified:
   core/branches/Branch_3_5/core/src/main/java/org/hibernate/cfg/Configuration.java
Log:
HHH-4647 Problems with @JoinColumn referencedColumnName and quoted column and table names


Modified: core/branches/Branch_3_5/core/src/main/java/org/hibernate/cfg/Configuration.java
===================================================================
--- core/branches/Branch_3_5/core/src/main/java/org/hibernate/cfg/Configuration.java	2010-07-01 11:09:45 UTC (rev 19881)
+++ core/branches/Branch_3_5/core/src/main/java/org/hibernate/cfg/Configuration.java	2010-07-01 11:25:53 UTC (rev 19882)
@@ -2718,12 +2718,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 ) {
@@ -2744,12 +2747,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