I implemented my own naming strategy:
but I can't get it called when using @Column/@JoinColumn with unique=true.
The resulting constraint/index SQL statement is always something like
when I expect
Let me know if you need a test-case (this is far too simple to verify).
Hibernate 5.2.2 MySQL 5.7
Note: ImplicitNamingStrategy names the constraint through @UniqueConstraint, but @Column(unique = true) generates a random name (e.g. UK_3u5h7y36qqa13y3mauc5xxayq).
If you search for "UK_" in Hibernate code you find all places where the naming is hardcoded. It should be easy to change this to use the implicit naming strategy.
Is there any plan to solve this problem?
Overriding Constraint class is not good way to achieve this functionality