Navigation Menu

Skip to content

Commit

Permalink
0005417: Fix NPE for conflict detection when table does not have a PK
Browse files Browse the repository at this point in the history
and all columns used including those with null values
  • Loading branch information
joshahicks committed Aug 22, 2022
1 parent 8a04be9 commit 0e9fb93
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -205,6 +205,9 @@ protected void modifyTimestampsForPrecision(IDatabasePlatform platform, Table ta
boolean checkDatetime = platform.getName().startsWith(DatabaseNamesConstants.MSSQL) || platform.getName().startsWith(DatabaseNamesConstants.ASE);
Column[] pkColumns = table.getPrimaryKeyColumns();
for (int i = 0; i < pkColumns.length && i < pkData.length; i++) {
if (pkData[i] == null) {
continue;
}
int type = pkColumns[i].getMappedTypeCode();
if (type == Types.TIMESTAMP || type == Types.TIME || type == ColumnTypes.TIMESTAMPTZ || type == ColumnTypes.TIMESTAMPLTZ
|| type == ColumnTypes.TIMETZ) {
Expand Down

0 comments on commit 0e9fb93

Please sign in to comment.