对selection的完整性处理还是要无条件执行
This commit is contained in:
parent
d86f3c9fde
commit
53528f6c8e
|
|
@ -30,9 +30,7 @@ var CascadeStore = /** @class */ (function (_super) {
|
|||
switch (_a.label) {
|
||||
case 0:
|
||||
noRelationDestEntities = [];
|
||||
if (!option.dontCollect) {
|
||||
this.reinforceSelectionInner(entity, selection, context, noRelationDestEntities);
|
||||
}
|
||||
this.reinforceSelectionInner(entity, selection, context, noRelationDestEntities);
|
||||
rewriterPromises = this.selectionRewriters.map(function (ele) { return ele(_this.getSchema(), entity, selection, context); });
|
||||
// 这个设计每次都要取actionAuth的数据,感觉不是很优雅。by Xc 20230722
|
||||
if (noRelationDestEntities.length > 0 && !option.dontCollect) {
|
||||
|
|
|
|||
|
|
@ -31,10 +31,8 @@ export abstract class CascadeStore<ED extends EntityDict & BaseEntityDict> exten
|
|||
|
||||
private async reinforceSelection<Cxt extends AsyncContext<ED>, OP extends SelectOption>(entity: keyof ED, selection: ED[keyof ED]['Selection'], context: Cxt, option: OP) {
|
||||
const noRelationDestEntities: string[] = [];
|
||||
|
||||
if (!option.dontCollect) {
|
||||
this.reinforceSelectionInner(entity, selection, context, noRelationDestEntities);
|
||||
}
|
||||
|
||||
this.reinforceSelectionInner(entity, selection, context, noRelationDestEntities);
|
||||
|
||||
const rewriterPromises: Promise<any>[] = this.selectionRewriters.map(
|
||||
ele => ele(this.getSchema(), entity, selection, context)
|
||||
|
|
|
|||
Loading…
Reference in New Issue