From b7d3e821ec6e8e7bf87ac8be4f56daca754a54bb Mon Sep 17 00:00:00 2001 From: chenson42 Date: Fri, 10 May 2013 12:47:21 +0000 Subject: [PATCH] 0001206: dataloader.ignore.missing.tables not working for initial load when initial.load.delete.first=true --- .../jumpmind/symmetric/io/data/writer/DatabaseWriter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DatabaseWriter.java b/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DatabaseWriter.java index 202078a3c1..d06323e951 100644 --- a/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DatabaseWriter.java +++ b/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DatabaseWriter.java @@ -156,12 +156,14 @@ public boolean start(Table table) { } public void write(CsvData data) { - if (data.requiresTable() && targetTable == null) { + if (data.requiresTable() && + (targetTable == null && data.getDataEventType() != DataEventType.SQL)) { // if we cross batches and the table isn't specified, then // use the last table we used start(context.getLastParsedTable()); } - if (targetTable != null || !data.requiresTable()) { + if (targetTable != null || !data.requiresTable() || + (targetTable == null && data.getDataEventType() == DataEventType.SQL)) { try { statistics.get(batch).increment(DataWriterStatisticConstants.STATEMENTCOUNT); statistics.get(batch).increment(DataWriterStatisticConstants.LINENUMBER);