Skip to content
Permalink
Browse files

0003892: MySQL Version 8 returning error code 1216 when foreign key

constraint is violated (used to be 1452)
  • Loading branch information...
philipmarzullo64 committed Mar 22, 2019
1 parent a975b40 commit 672b2f1212ca00f8bd7b59a85968e14c54abc5e2
@@ -34,7 +34,7 @@ public MySqlJdbcSqlTemplate(DataSource dataSource, SqlTemplateSettings settings,
super(dataSource, settings, lobHandler, databaseInfo);
primaryKeyViolationCodes = new int[] {1062};
uniqueKeyViolationNameRegex = new String[] { "Duplicate entry .* for key '(.*)'" };
foreignKeyViolationCodes = new int[] {1452};
foreignKeyViolationCodes = new int[] {1452, 1216};
foreignKeyChildExistsViolationCodes = new int[] {1451};
}

0 comments on commit 672b2f1

Please sign in to comment.
You can’t perform that action at this time.