This bug follows from the discussion in the forum:
I'll attach a test case in a minute.
The HBM mapping file contains a column "name" that's marked as unique. The goal is to provide a unique key name via a custom ImplicitNamingStrategy.
The ImplicitNamingStrategy contains a method "determineUniqueKeyName" for customizing unique key names, but it's not called at all in the test. The test cases setups up a custom NamingStrategy, but it's never called. You can also debug this in an IDE.
H2Dialect (Hibernate Test Templates) on Windows 7.
It seems, that the unique key name is generated here instead:
If it's confirmed as a bug it would be great if it could be fixed in Hibernate 5.0.x as we currently migrate a big application from 3 to 5.0.x. Thanks!
From a migration perspective, it would be quite useful to be able to customize constraint names via the naming strategy to match the existing ones in use.
Do you consider this issue in the near future?