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 d8e85e33ea..99ffd602e7 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 @@ -381,10 +381,11 @@ protected boolean filterBefore(CsvData data) { statistics.get(batch).startTimer(DataWriterStatisticConstants.FILTERMILLIS); for (IDatabaseWriterFilter filter : filters) { process &= filter.beforeWrite(this.context, this.sourceTable, data); - // re-lookup target table in case the source has changed + // re-lookup target table in case the source table has changed Table oldTargetTable = targetTable; targetTable = lookupTableAtTarget(this.sourceTable); if (!oldTargetTable.equals(targetTable)) { + // allow for auto increment columns to be inserted into if appropriate String quote = getPlatform().getDatabaseInfo().getDelimiterToken(); transaction.allowInsertIntoAutoIncrementColumns(false, oldTargetTable, quote); transaction.allowInsertIntoAutoIncrementColumns(true, targetTable, quote);