@tachybase/data-source 1.3.10 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,14 +28,14 @@ function totalPage(total, pageSize) {
|
|
|
28
28
|
}
|
|
29
29
|
__name(totalPage, "totalPage");
|
|
30
30
|
function findArgs(ctx) {
|
|
31
|
-
var _a;
|
|
31
|
+
var _a, _b, _c;
|
|
32
32
|
const resourceName = ctx.action.resourceName;
|
|
33
33
|
const params = ctx.action.params;
|
|
34
34
|
if (params.tree) {
|
|
35
35
|
const [collectionName, associationName] = resourceName.split(".");
|
|
36
36
|
const collection = ctx.db.getCollection(resourceName);
|
|
37
37
|
if (collection.options.tree && !(associationName && collectionName === collection.name)) {
|
|
38
|
-
const foreignKey = ((_a = collection.treeParentField) == null ? void 0 : _a.foreignKey) || "parentId";
|
|
38
|
+
const foreignKey = ((_c = (_b = collection.treeParentField) == null ? void 0 : _b.collection.model.rawAttributes[(_a = collection.treeParentField) == null ? void 0 : _a.foreignKey]) == null ? void 0 : _c.field) || "parentId";
|
|
39
39
|
(0, import_utils.assign)(params, { filter: { [foreignKey]: null } }, { filter: "andMerge" });
|
|
40
40
|
}
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/data-source",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"jsonwebtoken": "^8.5.1",
|
|
12
12
|
"koa-compose": "^4.1.0",
|
|
13
13
|
"lodash": "4.17.21",
|
|
14
|
-
"@tachybase/
|
|
15
|
-
"@tachybase/
|
|
16
|
-
"@tachybase/
|
|
17
|
-
"@tachybase/
|
|
18
|
-
"@tachybase/
|
|
19
|
-
"@tachybase/utils": "1.3.
|
|
14
|
+
"@tachybase/acl": "1.3.11",
|
|
15
|
+
"@tachybase/actions": "1.3.11",
|
|
16
|
+
"@tachybase/cache": "1.3.11",
|
|
17
|
+
"@tachybase/database": "1.3.11",
|
|
18
|
+
"@tachybase/resourcer": "1.3.11",
|
|
19
|
+
"@tachybase/utils": "1.3.11"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/koa": "^2.15.0",
|