Merge branch 'dev' of codeup.aliyun.com:61c14a7efa282c88e103c23f/oak-domain into dev

This commit is contained in:
Xu Chang 2022-06-16 14:38:41 +08:00
commit 20f62e55c5
2 changed files with 6 additions and 8 deletions

View File

@ -25,9 +25,6 @@ class CascadeStore extends RowStore_1.RowStore {
for (const attr in data) {
const relation = (0, relation_1.judgeRelation)(this.storageSchema, entity, attr);
if (relation === 1 || relation == 0) {
(0, lodash_1.assign)(projection, {
[`${attr}Id`]: 1,
});
(0, lodash_1.assign)(projection, {
[attr]: data[attr],
});
@ -84,7 +81,9 @@ class CascadeStore extends RowStore_1.RowStore {
}
}
}
const rows = await this.selectAbjointRow(entity, selection, context, params);
const rows = await this.selectAbjointRow(entity, (0, lodash_1.assign)({}, selection, {
data: projection,
}), context, params);
await Promise.all(
// manyToOne
(() => {

View File

@ -44,9 +44,6 @@ export abstract class CascadeStore<ED extends EntityDict, Cxt extends Context<ED
for (const attr in data) {
const relation = judgeRelation(this.storageSchema, entity, attr);
if (relation === 1 || relation == 0) {
assign(projection, {
[`${attr}Id`]: 1,
});
assign(projection, {
[attr]: data[attr],
});
@ -104,7 +101,9 @@ export abstract class CascadeStore<ED extends EntityDict, Cxt extends Context<ED
}
}
const rows = await this.selectAbjointRow(entity, selection, context, params);
const rows = await this.selectAbjointRow(entity, assign({}, selection, {
data: projection,
}), context, params);
await Promise.all(
// manyToOne