Brett Meyer commented on Bug HHH-7797

There's 3 different areas that need updated:

1.) "not null unique" syntax on a column.
2.) Creating unique constraints.
3.) Creating primary key constraints.

If #1 occurs, #2 and #3 need to be prevented (and vice versa). Currently, simultaneous #1 and #3 occurrences are not handled at all. For instance, the mentioned test case fails on Oracle since the column is "not null unique" and a primary key constraint is attempted as well.

Alternatively, I believe #1 and #2 are currently handled "properly" (although in a confusing way). If the dialect supports "not null unique", that's used and the unique constraint is prevented. We'd just need to prevent #1 and #3 from occurring at the same time.

One decision needs to be whether or not we use "unique" on the column period. If we continue to do so, handling all 3 conditions needs to be improved. Otherwise, simply prevent "unique" from happening on the column and all and always use constraints. Steve Ebersole, what do you think?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira