From 0593cbbc5afa6f17bbfe21424ce9d7231219f2e5 Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Mon, 7 Oct 2013 14:30:48 -0400 Subject: [PATCH] HHH-2155 mysql dialect should not generate automatically index for foreign key --- .../src/main/java/org/hibernate/dialect/MySQLDialect.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java index e7c9640722..a0ff52bd55 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java @@ -233,9 +233,7 @@ public class MySQLDialect extends Dialect { final String cols = StringHelper.join( ", ", foreignKey ); final String referencedCols = StringHelper.join( ", ", primaryKey ); return String.format( - " add index %s (%s), add constraint %s foreign key (%s) references %s (%s)", - constraintName, - cols, + " add constraint %s foreign key (%s) references %s (%s)", constraintName, cols, referencedTable,