From 875495439ed5cdc63d4af091c9d3ec4c7c32e8d8 Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Sat, 25 May 2013 20:24:53 -0400 Subject: [PATCH] HHH-8269 DenormalizedTable FK constraint names can be too long --- .../src/main/java/org/hibernate/mapping/DenormalizedTable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/DenormalizedTable.java b/hibernate-core/src/main/java/org/hibernate/mapping/DenormalizedTable.java index b8f38749eb..b5af82a86d 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/DenormalizedTable.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/DenormalizedTable.java @@ -49,7 +49,7 @@ public class DenormalizedTable extends Table { while ( iter.hasNext() ) { ForeignKey fk = (ForeignKey) iter.next(); createForeignKey( - fk.getName() + Integer.toHexString( getName().hashCode() ), + Constraint.generateName( fk.generatedConstraintNamePrefix(), this, fk.getColumns() ), fk.getColumns(), fk.getReferencedEntityName() );