🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@mikro-orm/core

Package Overview
Dependencies
Maintainers
1
Versions
4591
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.6.15
to
6.6.16-dev.0
+2
-2
package.json
{
"name": "@mikro-orm/core",
"version": "6.6.15",
"version": "6.6.16-dev.0",
"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.6.15",
"mikro-orm": "6.6.16-dev.0",
"reflect-metadata": "0.2.2"
}
}

@@ -506,3 +506,9 @@ "use strict";

const unwrap = prop.ref ? '?.unwrap()' : '';
let ret = ` if (${this.getPropertyCondition(path)}) {\n`;
let condition = this.getPropertyCondition(path);
// a getter may dereference state that only exists once hydrated, so when snapshotting an
// unhydrated reference we short-circuit the read behind the initialized check
if (prop.getter && !prop.setter && path.length === 1) {
condition = `entity.__helper.__initialized && ${condition}`;
}
let ret = ` if (${condition}) {\n`;
if (['number', 'string', 'boolean'].includes(prop.type.toLowerCase())) {

@@ -509,0 +515,0 @@ return ret + ` ret${dataKey} = entity${entityKey}${unwrap};\n }\n`;