HHH-10650 - Hibernate SchemaExport does not filter ForeignKey for namespaces and tables

This commit is contained in:
Andrea Boriero 2016-03-30 10:55:59 +02:00
parent add68bbe93
commit 68298bbc45
1 changed files with 7 additions and 0 deletions

View File

@ -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() ) {