Descriptive names for column constraints in Hibernate

Hibernate (re-)generates names for database constraints such as foreign keys or unique columns when creating a schema. However, the names for indexes and unique keys are not very descriptive, since they are created from a hash string of the table and column name.

Unreadable technical names may seem just to be an insignificant ugliness, but can become quite cumbersome when you are searching error logs for database problems…

Continue reading