Skip to content

Commit

Permalink
0003171: Trigger Rebuild: custom_before_insert_text is ignored when r…
Browse files Browse the repository at this point in the history
…ebuilding triggers

Added functionality to triggerMapper to look for the three "before" columns
  • Loading branch information
JJStarrett committed Jun 23, 2020
1 parent e32815a commit afd414c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Expand Up @@ -2125,6 +2125,19 @@ public Trigger mapRow(Row rs) {
if (!StringUtils.isBlank(text)) {
trigger.setCustomOnDeleteText(text);
}

text = rs.getString("custom_before_insert_text");
if (!StringUtils.isBlank(text)) {
trigger.setCustomBeforeInsertText(text);
}
text = rs.getString("custom_before_update_text");
if (!StringUtils.isBlank(text)) {
trigger.setCustomBeforeUpdateText(text);
}
text = rs.getString("custom_before_delete_text");
if (!StringUtils.isBlank(text)) {
trigger.setCustomBeforeDeleteText(text);
}

condition = rs.getString("external_select");
if (!StringUtils.isBlank(condition)) {
Expand Down
Expand Up @@ -79,6 +79,7 @@ public TriggerRouterServiceSqlMap(IDatabasePlatform platform,
+ " t.name_for_delete_trigger,t.name_for_insert_trigger,t.name_for_update_trigger, "
+ " t.sync_on_insert_condition,t.sync_on_update_condition,t.sync_on_delete_condition, "
+ " t.custom_on_insert_text,t.custom_on_update_text,t.custom_on_delete_text, "
+ " t.custom_before_insert_text,t.custom_before_update_text,t.custom_before_delete_text, "
+ " t.tx_id_expression,t.external_select,t.channel_expression, t.stream_row, "
+ " t.create_time as t_create_time, "
+ " t.last_update_time as t_last_update_time, t.last_update_by as t_last_update_by ");
Expand Down

0 comments on commit afd414c

Please sign in to comment.