修正了cascadeUpdate中一对多的先后顺序

This commit is contained in:
Xu Chang 2023-02-14 18:04:55 +08:00
parent abd152026c
commit e6bd3824d8
2 changed files with 4 additions and 2 deletions

View File

@ -647,7 +647,8 @@ var CascadeStore = /** @class */ (function (_super) {
}
}
}
beforeFns.push(function () { return cascadeUpdate.call(_this, entityOtm_1, otm, context, option2); });
// 一对多的依赖应该后建否则中间会出现空指针导致checker等出错
afterFns.push(function () { return cascadeUpdate.call(_this, entityOtm_1, otm, context, option2); });
};
if (otmOperations instanceof Array) {
try {

View File

@ -791,7 +791,8 @@ export abstract class CascadeStore<ED extends EntityDict & BaseEntityDict> exten
}
}
beforeFns.push(() => cascadeUpdate.call(this, entityOtm!, otm, context, option2));
// 一对多的依赖应该后建否则中间会出现空指针导致checker等出错
afterFns.push(() => cascadeUpdate.call(this, entityOtm!, otm, context, option2));
};
if (otmOperations instanceof Array) {