@mikro-orm/core
Advanced tools
+2
-2
| { | ||
| "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`; |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1250786
0.03%27191
0.02%1
Infinity%+ Added
- Removed
Updated