mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
HHH-11009 - Fix exception message to specify unique constraint only when index is unique.
This commit is contained in:
parent
58e4f89f47
commit
9b9becb903
@ -2039,7 +2039,13 @@ public List<Identifier> getColumnNames() {
|
||||
}
|
||||
|
||||
if ( unbound.size() > 0 || unboundNoLogical.size() > 0 ) {
|
||||
StringBuilder sb = new StringBuilder( "Unable to create unique key constraint (" );
|
||||
StringBuilder sb = new StringBuilder( "Unable to create " );
|
||||
if ( unique ) {
|
||||
sb.append( "unique key constraint (" );
|
||||
}
|
||||
else {
|
||||
sb.append( "index (" );
|
||||
}
|
||||
for ( String columnName : columnNames ) {
|
||||
sb.append( columnName ).append( ", " );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user