跨事务trigger在initialize时,要加上later标识

This commit is contained in:
Xu Chang 2024-04-30 10:00:52 +08:00
parent 80bc19e0f3
commit 8380982fc4
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class TriggerExecutor {
if (!context.getCurrentTxnId()) {
await context.begin();
}
await context.initialize(JSON.parse(cxtStr));
await context.initialize(JSON.parse(cxtStr), true);
try {
await this.execVolatileTrigger(entity, trigger.name, ids, context, option);
await context.commit();

View File

@ -68,7 +68,7 @@ export class TriggerExecutor<ED extends EntityDict & BaseEntityDict, Cxt extends
if (!context.getCurrentTxnId()) {
await context.begin();
}
await context.initialize(JSON.parse(cxtStr));
await context.initialize(JSON.parse(cxtStr), true);
try {
await this.execVolatileTrigger(entity, trigger.name, ids, context, option);
await context.commit();