@mikro-orm/core
Advanced tools
Comparing version 6.4.1-dev.3 to 6.4.1-dev.4
{ | ||
"name": "@mikro-orm/core", | ||
"version": "6.4.1-dev.3", | ||
"version": "6.4.1-dev.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.", | ||
@@ -67,5 +67,5 @@ "main": "index.js", | ||
"globby": "11.1.0", | ||
"mikro-orm": "6.4.1-dev.3", | ||
"mikro-orm": "6.4.1-dev.4", | ||
"reflect-metadata": "0.2.2" | ||
} | ||
} |
@@ -362,11 +362,19 @@ "use strict"; | ||
mapReturnedValues(entity, payload, row, meta, upsert = false) { | ||
if ((this.usesReturningStatement || upsert) && row && utils_1.Utils.hasObjectKeys(row)) { | ||
const mapped = this.comparator.mapResult(meta.className, row); | ||
if (entity) { | ||
this.hydrator.hydrate(entity, meta, mapped, this.factory, 'full', false, true); | ||
if ((!this.usesReturningStatement && !upsert) || !row || !utils_1.Utils.hasObjectKeys(row)) { | ||
return; | ||
} | ||
const mapped = this.comparator.mapResult(meta.className, row); | ||
if (entity) { | ||
this.hydrator.hydrate(entity, meta, mapped, this.factory, 'full', false, true); | ||
} | ||
if (upsert) { | ||
for (const prop of meta.props) { | ||
if (prop.customType && prop.name in mapped) { | ||
mapped[prop.name] = prop.customType.convertToJSValue(mapped[prop.name], this.platform); | ||
} | ||
} | ||
Object.assign(payload, mapped); // merge to the changeset payload, so it gets saved to the entity snapshot | ||
} | ||
Object.assign(payload, mapped); | ||
} | ||
} | ||
exports.ChangeSetPersister = ChangeSetPersister; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1088225
24151
+ Addedmikro-orm@6.4.1-dev.4(transitive)
- Removedmikro-orm@6.4.1-dev.3(transitive)
Updatedmikro-orm@6.4.1-dev.4