diff --git a/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java b/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java index d6b9687ccd..3f14051f20 100644 --- a/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java @@ -355,7 +355,14 @@ public class SchemaCreatorImpl implements SchemaCreator { for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 + if ( !schemaFilter.includeNamespace( namespace ) ) { + continue; + } + for ( Table table : namespace.getTables() ) { + if ( !schemaFilter.includeTable( table ) ) { + continue; + } // foreign keys final Iterator fkItr = table.getForeignKeyIterator(); while ( fkItr.hasNext() ) {