Skip to content

Commit

Permalink
0002859: Auto resolve foreign key violation by sending missing rows
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Oct 13, 2016
1 parent 80081a5 commit 22f4d53
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -1534,6 +1534,10 @@ public void reloadMissingForeignKeyRows(String nodeId, long dataId) {
DmlStatement st = platform.createDmlStatement(DmlType.WHERE, foreignTable, null);
Column[] foreignColumns = foreignColumnList.toArray(new Column[foreignColumnList.size()]);
String sql = st.buildDynamicSql(symmetricDialect.getBinaryEncoding(), foreignRow, false, true, foreignColumns).substring(6);
String delimiter = platform.getDatabaseInfo().getSqlCommandDelimiter();
if (delimiter != null && delimiter.length() > 0) {
sql = sql.substring(0, sql.length() - delimiter.length());
}

String catalog = foreignTable.getCatalog();
String schema = foreignTable.getSchema();
Expand Down

0 comments on commit 22f4d53

Please sign in to comment.