Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mikro-orm/core

Package Overview
Dependencies
Maintainers
0
Versions
3201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mikro-orm/core - npm Package Compare versions

Comparing version 6.4.1-dev.3 to 6.4.1-dev.4

4

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc