@webtypen/webframez-core 0.1.10 → 0.1.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.
- package/dist/Database/Model.js +2 -2
- package/package.json +1 -1
- package/src/Database/Model.ts +2 -2
package/dist/Database/Model.js
CHANGED
|
@@ -125,12 +125,12 @@ class Model {
|
|
|
125
125
|
*/
|
|
126
126
|
static aggregate(aggregation, collection) {
|
|
127
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
-
const model =
|
|
128
|
+
const model = new this();
|
|
129
129
|
return yield DBConnection_1.DBConnection.execute({
|
|
130
130
|
type: "aggregation",
|
|
131
131
|
table: collection ? collection : model ? model.__table : undefined,
|
|
132
132
|
aggregation: aggregation,
|
|
133
|
-
},
|
|
133
|
+
}, model.__connection);
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
/**
|
package/package.json
CHANGED
package/src/Database/Model.ts
CHANGED
|
@@ -112,14 +112,14 @@ export class Model {
|
|
|
112
112
|
* @returns any
|
|
113
113
|
*/
|
|
114
114
|
static async aggregate(aggregation: any, collection?: string) {
|
|
115
|
-
const model =
|
|
115
|
+
const model = new this();
|
|
116
116
|
return await DBConnection.execute(
|
|
117
117
|
{
|
|
118
118
|
type: "aggregation",
|
|
119
119
|
table: collection ? collection : model ? model.__table : undefined,
|
|
120
120
|
aggregation: aggregation,
|
|
121
121
|
},
|
|
122
|
-
|
|
122
|
+
model.__connection
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
125
|
|