@mikro-orm/mongodb 7.2.13-dev.8 → 7.2.13
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/MongoDriver.js +3 -2
- package/MongoEntityManager.js +2 -2
- package/package.json +3 -3
package/MongoDriver.js
CHANGED
|
@@ -282,9 +282,10 @@ export class MongoDriver extends DatabaseDriver {
|
|
|
282
282
|
}
|
|
283
283
|
return row;
|
|
284
284
|
});
|
|
285
|
-
data = data.map(row => {
|
|
285
|
+
data = data.map((row, idx) => {
|
|
286
286
|
row = { ...row };
|
|
287
|
-
|
|
287
|
+
// a row with an empty filter gets inserted, see `nativeUpdate`
|
|
288
|
+
this.handleVersionProperty(entityName, row, !(options.upsert && Utils.isEmpty(where[idx])));
|
|
288
289
|
return this.renameFields(entityName, row);
|
|
289
290
|
});
|
|
290
291
|
options = { ...options };
|
package/MongoEntityManager.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityManager, Utils, } from '@mikro-orm/core';
|
|
1
|
+
import { EntityManager, Utils, ValidationError, } from '@mikro-orm/core';
|
|
2
2
|
/**
|
|
3
3
|
* @inheritDoc
|
|
4
4
|
*/
|
|
@@ -36,7 +36,7 @@ export class MongoEntityManager extends EntityManager {
|
|
|
36
36
|
const meta = em.getMetadata().find(entityName);
|
|
37
37
|
const fields = Utils.asArray(groupBy);
|
|
38
38
|
if (options.having) {
|
|
39
|
-
throw new
|
|
39
|
+
throw new ValidationError('The `having` option is not supported for MongoDB in `countBy`.');
|
|
40
40
|
}
|
|
41
41
|
await em.tryFlush(entityName, options);
|
|
42
42
|
const rawWhere = options.where;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mongodb",
|
|
3
|
-
"version": "7.2.13
|
|
3
|
+
"version": "7.2.13",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"mongodb": "7.9.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@mikro-orm/core": "^7.2.
|
|
53
|
+
"@mikro-orm/core": "^7.2.13"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@mikro-orm/core": "7.2.13
|
|
56
|
+
"@mikro-orm/core": "7.2.13"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">= 22.17.0"
|