NamingStrategy doesn't allow us to name constraints when using @Column(unique = true).

Description

@UniqueConstraint allows you to name the constraint, while @Column(unique = true) generates a random name (e.g. UK_3u5h7y36qqa13y3mauc5xxayq).

That's alright for the annotation itself, but if you implement a NamingStrategy, it should allow us to name the constraints when using @Column(unique = true) also. Otherwise the naming get totally inconsistent.

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 a naming strategy.

Activity

Show:
Duplicate

Assignee

Reporter

Original estimate

2h

Time tracking

No time logged2h remaining

Components

Priority

Created June 27, 2017 at 7:55 PM
Updated June 28, 2017 at 8:05 AM
Resolved June 28, 2017 at 8:05 AM
Loading...