HHH-17883 Correct original column order for primary keys

This commit is contained in:
Marco Belladelli 2024-03-25 16:47:19 +01:00 committed by Marco Belladelli
parent 00d5f2f9e6
commit 205197bdf4
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ public class PrimaryKey extends Constraint {
final List<Column> columns = getColumns();
final Column[] columnsInOriginalOrder = new Column[columns.size()];
for ( int i = 0; i < columnsInOriginalOrder.length; i++ ) {
columnsInOriginalOrder[i] = columns.get( originalOrder[i] );
columnsInOriginalOrder[originalOrder[i]] = columns.get( i );
}
return Arrays.asList( columnsInOriginalOrder );
}