Merge branch 'release'

This commit is contained in:
Xu Chang 2024-04-30 12:29:20 +08:00
commit 6c2cdf5108
6 changed files with 10 additions and 4 deletions

View File

@ -43,7 +43,7 @@ class TriggerExecutor {
if (!context.getCurrentTxnId()) {
await context.begin();
}
await context.initialize(JSON.parse(cxtStr));
await context.initialize(JSON.parse(cxtStr), true);
try {
await this.execVolatileTrigger(entity, trigger.name, ids, context, option);
await context.commit();

View File

@ -29,5 +29,5 @@ import pullAll from 'lodash/pullAll';
* @returns
*/
declare function mergeConcatArray(object: any, source: any): any;
declare function mergeConcatMany<T>(array: Array<T>): T;
declare function mergeConcatMany<T>(array: Array<T>): T | undefined;
export { unset, pull, uniq, uniqBy, get, set, intersection, intersectionBy, omit, merge, mergeWith, mergeConcatArray, mergeConcatMany, cloneDeep, pick, isEqual, union, difference, differenceBy, groupBy, unionBy, pullAll, };

View File

@ -67,6 +67,9 @@ function mergeConcatArray(object, source) {
}
exports.mergeConcatArray = mergeConcatArray;
function mergeConcatMany(array) {
if (array.length === 0) {
return undefined;
}
return array.reduce((prev, current) => mergeConcatArray(prev, current));
}
exports.mergeConcatMany = mergeConcatMany;

View File

@ -1,6 +1,6 @@
{
"name": "oak-domain",
"version": "5.0.2",
"version": "5.0.3",
"author": {
"name": "XuChang"
},

View File

@ -68,7 +68,7 @@ export class TriggerExecutor<ED extends EntityDict & BaseEntityDict, Cxt extends
if (!context.getCurrentTxnId()) {
await context.begin();
}
await context.initialize(JSON.parse(cxtStr));
await context.initialize(JSON.parse(cxtStr), true);
try {
await this.execVolatileTrigger(entity, trigger.name, ids, context, option);
await context.commit();

View File

@ -44,6 +44,9 @@ function mergeConcatArray(object: any, source: any) {
}
function mergeConcatMany<T>(array: Array<T>) {
if (array.length === 0) {
return undefined;
}
return array.reduce(
(prev, current) => mergeConcatArray(prev, current)
) as T;