Browse Source

Pull request #8177: REPORT-90408【系统管理】迁移、启用数据库失败

Merge in CORE/base-third from ~LIDONGY/base-third:feature/x to feature/x

* commit 'aecfb8004bfacb7d9a5afbcb57c4000ee9ef9c79':
  REPORT-90408【系统管理】迁移、启用数据库失败
feature/x
lidongy-李东原 2 years ago
parent
commit
d7027acd99
  1. 8
      fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/extract/internal/InformationExtractorJdbcDatabaseMetaDataImpl.java

8
fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/extract/internal/InformationExtractorJdbcDatabaseMetaDataImpl.java

@ -650,11 +650,15 @@ public class InformationExtractorJdbcDatabaseMetaDataImpl implements Information
final int columnPosition = resultSet.getInt( "KEY_SEQ" );
final int index = columnPosition - 1;
// Fill up the array list with nulls up to the desired index, because some JDBC drivers don't return results ordered by column position
while ( pkColumns.size() <= index ) {
pkColumns.add( null );
}
final Identifier columnIdentifier = DatabaseIdentifier.toIdentifier(
resultSet.getString( "COLUMN_NAME" )
);
final ColumnInformation column = tableInformation.getColumn( columnIdentifier );
pkColumns.add( columnPosition-1, column );
pkColumns.set( index, tableInformation.getColumn( columnIdentifier ) );
}
}
finally {

Loading…
Cancel
Save