From 653cf910faf4409861ff77a581d2ed2af00fe041 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Thu, 14 Jan 2016 09:55:37 +0000 Subject: [PATCH] HHH-10401 - Fix Missing table names on foreign key circularity error message --- .../hibernate/boot/internal/InFlightMetadataCollectorImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java index 592ae18a15..a343e606be 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java @@ -1727,8 +1727,7 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector for ( FkSecondPass sp : dependencies ) { String dependentTable = sp.getValue().getTable().getQualifiedTableName().render(); if ( dependentTable.compareTo( startTable ) == 0 ) { - String sb = "Foreign key circularity dependency involving the following tables: "; - throw new AnnotationException( sb ); + throw new AnnotationException( "Foreign key circularity dependency involving the following tables: " + startTable + ", " + dependentTable ); } buildRecursiveOrderedFkSecondPasses( orderedFkSecondPasses, isADependencyOf, startTable, dependentTable ); if ( !orderedFkSecondPasses.contains( sp ) ) {