Skip to content

Commit

Permalink
0001076: Update transform that falls back to insert does not retransform
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Feb 26, 2013
1 parent 23bbc2f commit 0d755dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Expand Up @@ -246,4 +246,10 @@ public boolean isNoBinaryOldData() {
public void setNoBinaryOldData(boolean noBinaryOldData) {
this.noBinaryOldData = noBinaryOldData;
}

public CsvData copyWithoutOldData() {
CsvData data = new CsvData(getDataEventType(), getParsedData(CsvData.ROW_DATA));
data.attributes = attributes;
return data;
}
}
Expand Up @@ -89,8 +89,7 @@ public void needsResolved(DatabaseWriter writer, CsvData data, LoadStatus loadSt
switch (conflict.getResolveType()) {
case FALLBACK:
if (conflict.getDetectType() == DetectConflict.USE_PK_DATA) {
CsvData withoutOldData =
new CsvData(data.getDataEventType(), data.getParsedData(CsvData.ROW_DATA));
CsvData withoutOldData = data.copyWithoutOldData();
try {
// we already tried to update using the pk
performFallbackToInsert(writer, withoutOldData, conflict, true);
Expand Down

0 comments on commit 0d755dc

Please sign in to comment.