HHH-10401 - Fix Missing table names on foreign key circularity error message

This commit is contained in:
Andrea Boriero 2016-01-14 09:55:37 +00:00
parent 028aae9593
commit 6187805632
1 changed files with 1 additions and 2 deletions

View File

@ -1761,8 +1761,7 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
for ( FkSecondPass sp : dependencies ) { for ( FkSecondPass sp : dependencies ) {
String dependentTable = sp.getValue().getTable().getQualifiedTableName().render(); String dependentTable = sp.getValue().getTable().getQualifiedTableName().render();
if ( dependentTable.compareTo( startTable ) == 0 ) { if ( dependentTable.compareTo( startTable ) == 0 ) {
String sb = "Foreign key circularity dependency involving the following tables: "; throw new AnnotationException( "Foreign key circularity dependency involving the following tables: " + startTable + ", " + dependentTable );
throw new AnnotationException( sb );
} }
buildRecursiveOrderedFkSecondPasses( orderedFkSecondPasses, isADependencyOf, startTable, dependentTable ); buildRecursiveOrderedFkSecondPasses( orderedFkSecondPasses, isADependencyOf, startTable, dependentTable );
if ( !orderedFkSecondPasses.contains( sp ) ) { if ( !orderedFkSecondPasses.contains( sp ) ) {