diff --git a/lib/store/CascadeStore.js b/lib/store/CascadeStore.js index b0b4b0d..acd4300 100644 --- a/lib/store/CascadeStore.js +++ b/lib/store/CascadeStore.js @@ -247,7 +247,8 @@ class CascadeStore extends RowStore_1.RowStore { assignNecessaryProjectionAttrs(projectionNode, necessaryAttrs); } // 如果对象中指向一对多的Modi,此时加上指向Modi的projection - if (this.getSchema()[entity2].toModi) { + // 此逻辑关闭,用户自己撰写去取modi by Xc 20241207 + /* if (this.getSchema()[entity2].toModi) { Object.assign(projectionNode, { modi$entity: { $entity: 'modi', @@ -268,7 +269,7 @@ class CascadeStore extends RowStore_1.RowStore { }, } }); - } + } */ // 如果对象上有relation关系,在此将本用户相关的relation和actionAuth全部取出 // 还要将actionAuth上没有relation关系但destEntity为本对象的行也全部取出,这些是指向userId的可能路径 // 放在这里有点怪异,暂先这样 diff --git a/lib/store/projection.d.ts b/lib/store/projection.d.ts new file mode 100644 index 0000000..bbfdd90 --- /dev/null +++ b/lib/store/projection.d.ts @@ -0,0 +1,2 @@ +import { Projection } from '../base-app-domain/Modi/Schema'; +export declare const fullModi: Projection; diff --git a/lib/store/projection.js b/lib/store/projection.js new file mode 100644 index 0000000..58b16f1 --- /dev/null +++ b/lib/store/projection.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fullModi = void 0; +exports.fullModi = { + id: 1, + targetEntity: 1, + entity: 1, + entityId: 1, + action: 1, + iState: 1, + data: 1, + filter: 1, + $$createAt$$: 1, + $$updateAt$$: 1, +}; diff --git a/src/store/CascadeStore.ts b/src/store/CascadeStore.ts index 84c2b19..af0f565 100644 --- a/src/store/CascadeStore.ts +++ b/src/store/CascadeStore.ts @@ -308,7 +308,8 @@ export abstract class CascadeStore exten } // 如果对象中指向一对多的Modi,此时加上指向Modi的projection - if (this.getSchema()[entity2].toModi) { + // 此逻辑关闭,用户自己撰写去取modi by Xc 20241207 + /* if (this.getSchema()[entity2].toModi) { Object.assign(projectionNode, { modi$entity: { $entity: 'modi', @@ -329,7 +330,7 @@ export abstract class CascadeStore exten }, } }); - } + } */ // 如果对象上有relation关系,在此将本用户相关的relation和actionAuth全部取出 // 还要将actionAuth上没有relation关系但destEntity为本对象的行也全部取出,这些是指向userId的可能路径 diff --git a/src/store/projection.ts b/src/store/projection.ts new file mode 100644 index 0000000..3ab8cd1 --- /dev/null +++ b/src/store/projection.ts @@ -0,0 +1,14 @@ +import { Projection } from '../base-app-domain/Modi/Schema'; + +export const fullModi: Projection = { + id: 1, + targetEntity: 1, + entity: 1, + entityId: 1, + action: 1, + iState: 1, + data: 1, + filter: 1, + $$createAt$$: 1, + $$updateAt$$: 1, +};