|
The handling of unique constraints was somewhat improved by
HHH-7797
's addition of Dialect#uniqueDelegate. However, more is needed.
We need a way to handle all variations of:
-
unique vs. not unique
-
JPA @Index vs. no index
-
JPA @Index(unique = true) vs. @Index(unique = true)
Further, some DBs automatically create an index for a constraint (see http://www.postgresql.org/docs/8.0/static/indexes-unique.html as an example). Where that's not the case, explicitly create both. Handling needs tied to the Dialect.
suggestion: Dialect#applyConstraints( table, model)
|