保护了增加statusaggr后可能产生的几个边界

This commit is contained in:
Xu Chang 2023-01-08 18:10:06 +08:00
parent 5af252dfcf
commit 813dfcbb67
2 changed files with 6 additions and 6 deletions

View File

@ -147,7 +147,7 @@ function mergeOperationData(entity, schema, from, into) {
var result = mergeOperationOper(rel, schema, from[attr], into[attr]);
(0, assert_1.assert)(!result);
}
else if (rel instanceof Array) {
else if (rel instanceof Array && !attr.endsWith('$$aggr')) {
/**
* 两个一对多的list要合并直接合并list就可以了前端设计上应该不可能出现两个一对多的list相交的case
* $extraFile$XXX:1 $extraFile$XXX:2
@ -1518,7 +1518,7 @@ var SingleNode = /** @class */ (function (_super) {
_b[k] = subProjection,
_b));
}
else {
else if (!k.endsWith('$$aggr')) {
var child = this.children[k];
(0, assert_1.assert)(rel instanceof Array && child instanceof ListNode);
var subSelection = child.constructSelection();
@ -1662,7 +1662,7 @@ var SingleNode = /** @class */ (function (_super) {
}
}
else {
(0, assert_1.assert)(rel instanceof Array);
(0, assert_1.assert)(rel instanceof Array && !key2.endsWith('$$aggr'));
if (rel[1]) {
// 基于普通外键的一对多
if (id || value) {

View File

@ -203,7 +203,7 @@ function mergeOperationData<ED extends EntityDict & BaseEntityDict, T extends ke
const result = mergeOperationOper(rel, schema, (from[attr] as any), (into[attr] as any));
assert(!result);
}
else if (rel instanceof Array) {
else if (rel instanceof Array && !attr.endsWith('$$aggr')) {
/**
* list要合并list就可以了list相交的case
* $extraFile$XXX:1 $extraFile$XXX:2
@ -1498,7 +1498,7 @@ class SingleNode<ED extends EntityDict & BaseEntityDict,
[k]: subProjection,
});
}
else {
else if (!k.endsWith('$$aggr')) {
const child = this.children[k];
assert(rel instanceof Array && child instanceof ListNode);
const subSelection = child.constructSelection();
@ -1634,7 +1634,7 @@ class SingleNode<ED extends EntityDict & BaseEntityDict,
}
}
else {
assert(rel instanceof Array);
assert(rel instanceof Array && !key2.endsWith('$$aggr'));
if (rel[1]) {
// 基于普通外键的一对多
if (id || value) {