@nocobase/database 1.4.0-alpha.9 → 1.4.0-beta.2
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.
|
@@ -99,13 +99,19 @@ const _MultipleRelationRepository = class _MultipleRelationRepository extends im
|
|
|
99
99
|
];
|
|
100
100
|
}
|
|
101
101
|
async count(options) {
|
|
102
|
+
var _a;
|
|
102
103
|
const transaction2 = await this.getTransaction(options);
|
|
103
104
|
const sourceModel = await this.getSourceModel(transaction2);
|
|
104
105
|
if (!sourceModel) return 0;
|
|
105
106
|
const queryOptions = this.buildQueryOptions(options);
|
|
107
|
+
const include = (_a = queryOptions.include) == null ? void 0 : _a.filter((item) => {
|
|
108
|
+
var _a2;
|
|
109
|
+
const association = (_a2 = this.targetModel.associations) == null ? void 0 : _a2[item.association];
|
|
110
|
+
return (association == null ? void 0 : association.associationType) !== "BelongsToArray";
|
|
111
|
+
});
|
|
106
112
|
const count = await sourceModel[this.accessors().get]({
|
|
107
113
|
where: queryOptions.where,
|
|
108
|
-
include
|
|
114
|
+
include,
|
|
109
115
|
includeIgnoreAttributes: false,
|
|
110
116
|
attributes: [
|
|
111
117
|
[
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/database",
|
|
3
|
-
"version": "1.4.0-
|
|
3
|
+
"version": "1.4.0-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
7
|
"license": "AGPL-3.0",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nocobase/logger": "1.4.0-
|
|
10
|
-
"@nocobase/utils": "1.4.0-
|
|
9
|
+
"@nocobase/logger": "1.4.0-beta.2",
|
|
10
|
+
"@nocobase/utils": "1.4.0-beta.2",
|
|
11
11
|
"async-mutex": "^0.3.2",
|
|
12
12
|
"chalk": "^4.1.1",
|
|
13
13
|
"cron-parser": "4.4.0",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
39
39
|
"directory": "packages/database"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "d5b141a3cd197a3165d69306b99135ea0c7e4aa2"
|
|
42
42
|
}
|