From c77cfb47631e5056b35624c6528c9a9ac483833f Mon Sep 17 00:00:00 2001 From: mmichalek Date: Mon, 19 Sep 2016 16:52:42 -0400 Subject: [PATCH] 0002807: DBCompare should process tables that have a PK mapped in a transform, even if they don't have a physical PK --- .../main/java/org/jumpmind/symmetric/io/DbCompare.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/symmetric-core/src/main/java/org/jumpmind/symmetric/io/DbCompare.java b/symmetric-core/src/main/java/org/jumpmind/symmetric/io/DbCompare.java index 34c576a9db..825dc3a0e8 100644 --- a/symmetric-core/src/main/java/org/jumpmind/symmetric/io/DbCompare.java +++ b/symmetric-core/src/main/java/org/jumpmind/symmetric/io/DbCompare.java @@ -319,10 +319,6 @@ protected List loadTables(List tableNames) { log.warn("No source table found for table name {}", tableName); continue; } - if (sourceTable.getPrimaryKeyColumnCount() == 0) { - log.warn("Source table {} doesn't have any primary key columns and will not be considered in the comparison.", sourceTable); - continue; - } DbCompareTables tables = new DbCompareTables(sourceTable, null); @@ -333,6 +329,11 @@ protected List loadTables(List tableNames) { } tables.applyColumnMappings(); + + if (tables.getSourceTable().getPrimaryKeyColumnCount() == 0) { + log.warn("Source table {} doesn't have any primary key columns and will not be considered in the comparison.", sourceTable); + continue; + } boolean success = mapPrimaryKey(tables); if (success) {