From ad48fabc1662e259741d8f07e1033c6d65be0e59 Mon Sep 17 00:00:00 2001 From: chris-manning Date: Thu, 10 Jan 2013 10:58:45 +0000 Subject: [PATCH] HHH-7915 Include referenced columns when creating foreign keys from the included table --- .../src/main/java/org/hibernate/mapping/DenormalizedTable.java | 3 ++- 1 file changed, 2 insertions(+), 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 b02805b1e6..aac0be9ca1 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/DenormalizedTable.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/DenormalizedTable.java @@ -51,7 +51,8 @@ public class DenormalizedTable extends Table { createForeignKey( Constraint.generateName( fk.generatedConstraintNamePrefix(), this, fk.getColumns() ), fk.getColumns(), - fk.getReferencedEntityName() + fk.getReferencedEntityName(), + fk.getReferencedColumns() ); } }