| In Hibernate 5, the FK name is determined by the implicit naming strategy. This includes the prefix. When using ImplicitNamingStrategyJpaCompliantImpl it is "FK" In Hibernate 4, the prefix comes from ForeignKey.generatedConstraintNamePrefix. So it is "FK_". I don't know if the was on purpose. Might be. However, the weird part is if I check who's using generatedConstraintNamePrefix since it should by unused in Hibernate 5 I guess. I found DenormalizedTable. This doesn't seem to make sense. The naming strategy should be the same for a Table and a DenormalizedTable. From my deductions, generatedConstraintNamePrefix should disappear and DenormalizedTable.createForeignKeys should be empty. And we might want to add an underscore in determineForeignKeyName to be coherent with hibernate 4. |