Author: max.andersen(a)jboss.com
Date: 2006-11-17 13:38:15 -0500 (Fri, 17 Nov 2006)
New Revision: 10842
Modified:
branches/Branch_3_2/Hibernate3/src/org/hibernate/cfg/Configuration.java
Log:
HHH-2251 Settings build unnecessary in schemaupdate/schemavalidate
(merge from branch_3_2)
Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/cfg/Configuration.java
===================================================================
--- branches/Branch_3_2/Hibernate3/src/org/hibernate/cfg/Configuration.java 2006-11-17
18:29:10 UTC (rev 10841)
+++ branches/Branch_3_2/Hibernate3/src/org/hibernate/cfg/Configuration.java 2006-11-17
18:38:15 UTC (rev 10842)
@@ -944,11 +944,11 @@
while ( iter.hasNext() ) {
Table table = (Table) iter.next();
if ( table.isPhysicalTable() ) {
- Settings settings = buildSettings();
+
TableMetadata tableInfo = databaseMetadata.getTableMetadata(
table.getName(),
- ( table.getSchema() == null ) ? settings.getDefaultSchemaName() :
table.getSchema(),
- ( table.getCatalog() == null ) ? settings.getDefaultCatalogName() :
table.getCatalog(),
+ ( table.getSchema() == null ) ? defaultSchema : table.getSchema(),
+ ( table.getCatalog() == null ) ? defaultCatalog : table.getCatalog(),
table.isQuoted()
);
@@ -1062,16 +1062,19 @@
throws HibernateException {
secondPassCompile();
+ String defaultCatalog = properties.getProperty( Environment.DEFAULT_CATALOG );
+ String defaultSchema = properties.getProperty( Environment.DEFAULT_SCHEMA );
+
Iterator iter = getTableMappings();
while ( iter.hasNext() ) {
Table table = (Table) iter.next();
if ( table.isPhysicalTable() ) {
- Settings settings = buildSettings();
+
TableMetadata tableInfo = databaseMetadata.getTableMetadata(
table.getName(),
- ( table.getSchema() == null ) ? settings.getDefaultSchemaName() :
table.getSchema(),
- ( table.getCatalog() == null ) ? settings.getDefaultCatalogName() :
table.getCatalog(),
+ ( table.getSchema() == null ) ? defaultSchema : table.getSchema(),
+ ( table.getCatalog() == null ) ? defaultCatalog : table.getCatalog(),
table.isQuoted());
if ( tableInfo == null ) {
throw new HibernateException( "Missing table: " + table.getName() );
Show replies by date