Skip to content

Commit

Permalink
0004292: Auto resolve foreign keys not working when source is
Browse files Browse the repository at this point in the history
extract-only database
  • Loading branch information
erilong committed Feb 27, 2020
1 parent 38b468f commit 6757bba
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -46,6 +46,7 @@
import org.apache.commons.lang.StringUtils;
import org.jumpmind.db.model.Table;
import org.jumpmind.db.platform.DatabaseInfo;
import org.jumpmind.db.platform.IDatabasePlatform;
import org.jumpmind.db.sql.ISqlReadCursor;
import org.jumpmind.db.sql.ISqlRowMapper;
import org.jumpmind.db.sql.ISqlTransaction;
Expand Down Expand Up @@ -2366,6 +2367,7 @@ protected String reloadTable(String nodeId, String catalogName, String schemaNam

public void reloadMissingForeignKeyRowsReverse(String sourceNodeId, Table table, CsvData data, String channelId, boolean sendCorrectionToPeers) {
try {
IDatabasePlatform platform = engine.getTargetDialect().getPlatform();
Map<String, String> dataMap = data.toColumnNameValuePairs(table.getColumnNames(), CsvData.ROW_DATA);
List<TableRow> tableRows = new ArrayList<TableRow>();
Row row = new Row(dataMap.size());
Expand Down Expand Up @@ -2436,6 +2438,7 @@ public void reloadMissingForeignKeyRowsReverse(String sourceNodeId, Table table,

public void reloadMissingForeignKeyRows(String nodeId, long dataId) {
try {
IDatabasePlatform platform = engine.getTargetDialect().getPlatform();
Data data = findData(dataId);
log.debug("reloadMissingForeignKeyRows for nodeId '{}' dataId '{}' table '{}'", nodeId, dataId, data.getTableName());
TriggerHistory hist = data.getTriggerHistory();
Expand Down

0 comments on commit 6757bba

Please sign in to comment.