Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@mikro-orm/core

Package Overview
Dependencies
Maintainers
1
Versions
4546
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
7.1.4-dev.0
to
7.1.4-dev.1
+1
-1
package.json
{
"name": "@mikro-orm/core",
"version": "7.1.4-dev.0",
"version": "7.1.4-dev.1",
"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,0 +5,0 @@ "keywords": [

@@ -396,3 +396,21 @@ import { clone } from './clone.js';

}
lines.push(` for (let k in result) { if (Object.hasOwn(result, k) && !mapped[k] && ret[k] === undefined) ret[k] = result[k]; }`);
// pass through any unmapped columns (e.g. extra selections or virtual props). for embeddables we restrict
// this to declared keys, otherwise JSON keys not part of the schema leak into the original data while
// hydration drops them from the entity, diverging the snapshot and triggering spurious updates.
let knownKeysGuard = '';
if (meta.embeddable) {
const knownKeys = new Set();
for (const m of meta.polymorphs?.length ? meta.polymorphs : [meta]) {
for (const prop of m.props) {
knownKeys.add(prop.name);
if (prop.embedded) {
knownKeys.add(prop.embedded[1]);
}
prop.fieldNames?.forEach(field => knownKeys.add(field));
}
}
context.set('knownKeys', knownKeys);
knownKeysGuard = ' && knownKeys.has(k)';
}
lines.push(` for (let k in result) { if (Object.hasOwn(result, k) && !mapped[k] && ret[k] === undefined${knownKeysGuard}) ret[k] = result[k]; }`);
const code = `// compiled mapper for entity ${meta.className}\n` +

@@ -399,0 +417,0 @@ `return function(result) {\n const ret = {};\n${lines.join('\n')}\n return ret;\n}`;

@@ -144,3 +144,3 @@ import { clone } from './clone.js';

static PK_SEPARATOR = '~~~';
static #ORM_VERSION = '7.1.4-dev.0';
static #ORM_VERSION = '7.1.4-dev.1';
/**

@@ -147,0 +147,0 @@ * Checks if the argument is instance of `Object`. Returns false for arrays.

Sorry, the diff of this file is too big to display