@mikro-orm/core 7.0.4-dev.1 → 7.0.4-dev.10
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/EntityManager.js +12 -0
- package/package.json +1 -1
- package/utils/Utils.js +1 -1
package/EntityManager.js
CHANGED
|
@@ -790,6 +790,12 @@ export class EntityManager {
|
|
|
790
790
|
return em.assign(exists, data);
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
|
+
for (const key of Object.keys(data)) {
|
|
794
|
+
const prop = meta.properties[key];
|
|
795
|
+
if (prop?.persist === false) {
|
|
796
|
+
delete data[key];
|
|
797
|
+
}
|
|
798
|
+
}
|
|
793
799
|
}
|
|
794
800
|
where = getWhereCondition(meta, options.onConflictFields, data, where).where;
|
|
795
801
|
data = QueryHelper.processObjectParams(data);
|
|
@@ -936,6 +942,12 @@ export class EntityManager {
|
|
|
936
942
|
continue;
|
|
937
943
|
}
|
|
938
944
|
}
|
|
945
|
+
for (const key of Object.keys(row)) {
|
|
946
|
+
const prop = meta.properties[key];
|
|
947
|
+
if (prop?.persist === false) {
|
|
948
|
+
delete row[key];
|
|
949
|
+
}
|
|
950
|
+
}
|
|
939
951
|
}
|
|
940
952
|
const unique = options.onConflictFields ?? meta.props.filter(p => p.unique).map(p => p.name);
|
|
941
953
|
propIndex =
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.0.4-dev.
|
|
3
|
+
"version": "7.0.4-dev.10",
|
|
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",
|
package/utils/Utils.js
CHANGED
|
@@ -129,7 +129,7 @@ export function parseJsonSafe(value) {
|
|
|
129
129
|
/** Collection of general-purpose utility methods used throughout the ORM. */
|
|
130
130
|
export class Utils {
|
|
131
131
|
static PK_SEPARATOR = '~~~';
|
|
132
|
-
static #ORM_VERSION = '7.0.4-dev.
|
|
132
|
+
static #ORM_VERSION = '7.0.4-dev.10';
|
|
133
133
|
/**
|
|
134
134
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
135
135
|
*/
|