@mikro-orm/mongodb 6.2.10-dev.5 → 6.2.10-dev.51
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 +2 -2
- package/package.json +2 -2
package/MongoDriver.js
CHANGED
|
@@ -104,7 +104,7 @@ class MongoDriver extends core_1.DatabaseDriver {
|
|
|
104
104
|
const meta = this.metadata.find(entityName);
|
|
105
105
|
/* istanbul ignore next */
|
|
106
106
|
const rename = (field) => meta ? (meta.properties[field]?.fieldNames[0] ?? field) : field;
|
|
107
|
-
if (options.onConflictFields) {
|
|
107
|
+
if (options.onConflictFields && Array.isArray(options.onConflictFields)) {
|
|
108
108
|
options.onConflictFields = options.onConflictFields.map(rename);
|
|
109
109
|
}
|
|
110
110
|
if (options.onConflictMergeFields) {
|
|
@@ -127,7 +127,7 @@ class MongoDriver extends core_1.DatabaseDriver {
|
|
|
127
127
|
const meta = this.metadata.find(entityName);
|
|
128
128
|
/* istanbul ignore next */
|
|
129
129
|
const rename = (field) => meta ? (meta.properties[field]?.fieldNames[0] ?? field) : field;
|
|
130
|
-
if (options.onConflictFields) {
|
|
130
|
+
if (options.onConflictFields && Array.isArray(options.onConflictFields)) {
|
|
131
131
|
options.onConflictFields = options.onConflictFields.map(rename);
|
|
132
132
|
}
|
|
133
133
|
if (options.onConflictMergeFields) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mongodb",
|
|
3
|
-
"version": "6.2.10-dev.
|
|
3
|
+
"version": "6.2.10-dev.51",
|
|
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
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"@mikro-orm/core": "^6.2.9"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@mikro-orm/core": "6.2.10-dev.
|
|
68
|
+
"@mikro-orm/core": "6.2.10-dev.51"
|
|
69
69
|
}
|
|
70
70
|
}
|