Skip to content

Commit

Permalink
0005009: Auto resolve missing foreign key for SYM tables
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed May 27, 2021
1 parent bd8c1b0 commit d652a67
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -2406,7 +2406,17 @@ protected String reloadTable(String nodeId, String catalogName, String schemaNam
for (TriggerHistory triggerHistory : triggerHistories) {
List<TriggerRouter> triggerRouters = triggerRoutersByHistoryId.get(triggerHistory
.getTriggerHistoryId());
if (triggerRouters != null && triggerRouters.size() > 0) {

boolean hasTriggerRouters = triggerRouters != null && triggerRouters.size() > 0;

if (!hasTriggerRouters && triggerHistory.getSourceTableName().startsWith(parameterService.getTablePrefix())) {
if (overrideChannelId == null) {
overrideChannelId = Constants.CHANNEL_RELOAD;
}
hasTriggerRouters = triggerRouters.add(new TriggerRouter());
}

if (hasTriggerRouters) {
for (TriggerRouter triggerRouter : triggerRouters) {
eventCount++;
String channelId = overrideChannelId;
Expand Down

0 comments on commit d652a67

Please sign in to comment.