Skip to content

Commit

Permalink
0002368: Null key value causes additive transform not to work
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Aug 10, 2015
1 parent 8121611 commit d07ddae
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -123,7 +123,10 @@ public String transform(IDatabasePlatform platform, DataContext context,
Column targetCol = table.getColumnWithName(keyNames[i]);
if (targetCol != null) {
columns.add(targetCol);
keyValuesList.add(sourceValues.get(keyNames[i]));
String value = sourceValues.get(keyNames[i]);
if (value != null) {
keyValuesList.add(value);
}
if (addedFirstKey) {
sql.append("and ");
} else {
Expand All @@ -132,7 +135,11 @@ public String transform(IDatabasePlatform platform, DataContext context,
sql.append(quote);
sql.append(keyNames[i]);
sql.append(quote);
sql.append("=? ");
if (value == null) {
sql.append("is null ");
} else {
sql.append("=? ");
}
}
}

Expand Down

0 comments on commit d07ddae

Please sign in to comment.