收集relation的时候,添加上了update时间戳

This commit is contained in:
Xu Chang 2024-09-15 18:48:25 +08:00
parent c2c073dc21
commit 53e634be41
2 changed files with 14 additions and 6 deletions

View File

@ -22,7 +22,7 @@ class CascadeStore extends RowStore_1.RowStore {
selectionRewriters = [];
operationRewriters = [];
async reinforceSelectionAsync(entity, selection, context, option, isAggr) {
if (!isAggr && !selection.distinct) {
if (!isAggr && !selection.distinct && !option.dontCollect) {
this.reinforceSelectionInner(entity, selection, context);
}
const rewriterPromises = this.selectionRewriters.map(ele => ele(this.getSchema(), entity, selection, context, option, isAggr));
@ -289,7 +289,11 @@ class CascadeStore extends RowStore_1.RowStore {
id: 1,
name: 1,
display: 1,
}
[Entity_1.CreateAtAttribute]: 1,
[Entity_1.UpdateAtAttribute]: 1,
},
[Entity_1.CreateAtAttribute]: 1,
[Entity_1.UpdateAtAttribute]: 1,
},
filter: {
userId,
@ -1403,12 +1407,12 @@ class CascadeStore extends RowStore_1.RowStore {
context.saveOpRecord(entity, {
id: operId,
action,
data: {},
data: data,
filter: {
id: {
$in: ids,
}
}
},
});
}
}

View File

@ -37,7 +37,7 @@ export abstract class CascadeStore<ED extends EntityDict & BaseEntityDict> exten
option: Op,
isAggr?: true) {
if (!isAggr && !selection.distinct) {
if (!isAggr && !selection.distinct && !option.dontCollect) {
this.reinforceSelectionInner(entity, selection, context);
}
@ -350,7 +350,11 @@ export abstract class CascadeStore<ED extends EntityDict & BaseEntityDict> exten
id: 1,
name: 1,
display: 1,
}
[CreateAtAttribute]: 1,
[UpdateAtAttribute]: 1,
},
[CreateAtAttribute]: 1,
[UpdateAtAttribute]: 1,
},
filter: {
userId,