HHH-8092 Added comment about unique constraints in schema update.

This commit is contained in:
Brett Meyer 2013-04-05 12:15:48 -04:00
parent 5cc051e1df
commit cf921df1d0
1 changed files with 3 additions and 1 deletions

View File

@ -1190,7 +1190,9 @@ public class Configuration implements Serializable {
Iterator uniqueIter = table.getUniqueKeyIterator();
while ( uniqueIter.hasNext() ) {
final UniqueKey uniqueKey = (UniqueKey) uniqueIter.next();
// Skip if index already exists
// Skip if index already exists. Most of the time, this
// won't work since most Dialects use Constraints. However,
// keep it for the few that do use Indexes.
if ( tableInfo != null && StringHelper.isNotEmpty( uniqueKey.getName() ) ) {
final IndexMetadata meta = tableInfo.getIndexMetadata( uniqueKey.getName() );
if ( meta != null ) {