Skip to content

Commit

Permalink
Merge pull request #3763 from actiontech/fix/2283
Browse files Browse the repository at this point in the history
fix: rows that do not need to be changed are not correctly removed during update or delete
  • Loading branch information
LUAgam authored Jul 7, 2023
2 parents 409823f + 735d126 commit 2885693
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public static Set<LinkedHashMap<String, String>> getAffectPks(ManagerService man
String value = null == row.getValue(i) ? null : new String(row.getValue(i), charset);
affectPk.put(columnName, value);
if (null != values) {
boolean match = values.entrySet().stream().anyMatch(valueEntry -> !StringUtil.equals(affectPk.get(valueEntry.getKey()), valueEntry.getValue()));
if (!match) {
boolean isSkipRow = values.entrySet().stream().allMatch(valueEntry -> affectPk.containsKey(valueEntry.getKey()) && StringUtil.equals(affectPk.get(valueEntry.getKey()), valueEntry.getValue()));
if (isSkipRow) {
breakFlag = true;
break;
}
Expand Down

0 comments on commit 2885693

Please sign in to comment.