diff --git a/README.md b/README.md new file mode 100644 index 0000000000..4519b5003e --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# SymmetricDS +SymmetricDS is a database and file synchronization solution that is platform-independent, web-enabled, and database agnostic. SymmetricDS was built to make data replication across two to tens of thousands of databases and file systems fast, easy and resilient. We specialize in near real time, bi-directional data replication across large node networks over the WAN or LAN. + +##Development +We use Eclipse for development. + +To setup a development environment run the following commands: +``` +cd symmetric-assemble +./gradlew develop +``` + +This will generate Eclipse project artifacts. You can then import the projects into your Eclipse workspace. diff --git a/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/DbExport.java b/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/DbExport.java index 7f42191c34..0e8eaa47bc 100644 --- a/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/DbExport.java +++ b/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/DbExport.java @@ -170,6 +170,9 @@ public void exportTables(OutputStream output, Table[] tables, String sql) throws tables[i] = platform.readTableFromDatabase(getCatalogToUse(), getSchemaToUse(), tables[i].getName()); } + + /* make a copy so if we zero out catalog and schema we don't effect the original */ + tables[i] = tables[i].copy(); } WriterWrapper writerWrapper = null; @@ -462,7 +465,7 @@ protected void startTable(Table table) { && table.getCatalog().equals(platform.getDefaultCatalog())) { table.setCatalog(null); } - if (table.getSchema() != null + if (table.getCatalog() == null && table.getSchema() != null && table.getSchema().equals(platform.getDefaultSchema())) { table.setSchema(null); } diff --git a/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/AdditiveColumnTransform.java b/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/AdditiveColumnTransform.java index 4ae8087940..b97c726d5b 100644 --- a/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/AdditiveColumnTransform.java +++ b/symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/transform/AdditiveColumnTransform.java @@ -123,7 +123,10 @@ public String transform(IDatabasePlatform platform, DataContext context, Column targetCol = table.getColumnWithName(keyNames[i]); if (targetCol != null) { columns.add(targetCol); - keyValuesList.add(sourceValues.get(keyNames[i])); + String value = sourceValues.get(keyNames[i]); + if (value != null) { + keyValuesList.add(value); + } if (addedFirstKey) { sql.append("and "); } else { @@ -132,7 +135,11 @@ public String transform(IDatabasePlatform platform, DataContext context, sql.append(quote); sql.append(keyNames[i]); sql.append(quote); - sql.append("=? "); + if (value == null) { + sql.append("is null "); + } else { + sql.append("=? "); + } } } diff --git a/symmetric-server/src/main/deploy/engines/.gitignore b/symmetric-server/src/main/deploy/engines/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/symmetric-server/src/main/deploy/logs/.gitignore b/symmetric-server/src/main/deploy/logs/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/symmetric-server/src/main/deploy/patches/.gitignore b/symmetric-server/src/main/deploy/patches/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/symmetric-server/src/main/deploy/tmp/.gitignore b/symmetric-server/src/main/deploy/tmp/.gitignore new file mode 100644 index 0000000000..e69de29bb2