HHH-16943 Column ordering leads to wrong column order in unique constraints + HHH-16953 Hibernate doesn't observe column order on multicolumn indexes

This commit is contained in:
Andrea Boriero 2023-07-19 16:06:21 +02:00 committed by Andrea Boriero
parent 58eaf74213
commit 16117dddb0
1 changed files with 0 additions and 12 deletions

View File

@ -417,18 +417,6 @@ public class MetadataImpl implements MetadataImplementor, Serializable {
primaryKey.reorderColumns( primaryKeyColumns ); primaryKey.reorderColumns( primaryKeyColumns );
} }
} }
for ( UniqueKey uniqueKey : table.getUniqueKeys().values() ) {
if ( uniqueKey.getColumns().size() > 1 ) {
final List<Column> uniqueKeyColumns = columnOrderingStrategy.orderConstraintColumns(
uniqueKey,
this
);
if ( uniqueKeyColumns != null ) {
uniqueKey.getColumns().clear();
uniqueKey.getColumns().addAll( uniqueKeyColumns );
}
}
}
for ( ForeignKey foreignKey : table.getForeignKeys().values() ) { for ( ForeignKey foreignKey : table.getForeignKeys().values() ) {
final List<Column> columns = foreignKey.getColumns(); final List<Column> columns = foreignKey.getColumns();
if ( columns.size() > 1 ) { if ( columns.size() > 1 ) {