🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP →
Sign In

@mikro-orm/core

Package Overview
Dependencies
Maintainers
1
Versions
4674
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.9-dev.10
to
7.1.9-dev.11
+1
-1
package.json
{
"name": "@mikro-orm/core",
"version": "7.1.9-dev.10",
"version": "7.1.9-dev.11",
"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": [

@@ -240,3 +240,4 @@ import { EntityIdentifier } from '../entity/EntityIdentifier.js';

const row = map.get(helper(changeSet.entity).getSerializedPrimaryKey());
this.mapReturnedValues(changeSet.entity, changeSet.payload, row, meta);
// STI batches can mix child types, so map through the change set's own metadata
this.mapReturnedValues(changeSet.entity, changeSet.payload, row, changeSet.meta);
}

@@ -382,3 +383,4 @@ changeSet.persisted = true;

if (isRaw(cs.payload[k]) && isRaw(cs.entity[k])) {
returning.add(meta.properties[k]);
// STI batches can mix child types, so the property might not exist on `meta`
returning.add(cs.meta.properties[k]);
}

@@ -408,3 +410,5 @@ });

});
const data = await this.#driver.find(meta.class, { [pk]: { $in: pks } }, options);
// a mixed STI batch shares one table but the child discriminator would filter out the siblings
const target = changeSets.some(cs => cs.meta !== meta) && meta.root.discriminatorColumn ? meta.root : meta;
const data = await this.#driver.find(target.class, { [pk]: { $in: pks } }, options);
const map = new Map();

@@ -414,3 +418,3 @@ data.forEach(item => map.set(Utils.getCompositeKeyHash(item, meta, false, this.#platform, true), item));

const data = map.get(helper(changeSet.entity).getSerializedPrimaryKey());
this.#hydrator.hydrate(changeSet.entity, meta, data, this.#factory, 'full', false, true);
this.#hydrator.hydrate(changeSet.entity, changeSet.meta, data, this.#factory, 'full', false, true);
Object.assign(changeSet.payload, data); // merge to the changeset payload, so it gets saved to the entity snapshot

@@ -417,0 +421,0 @@ }

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

static PK_SEPARATOR = '~~~';
static #ORM_VERSION = '7.1.9-dev.10';
static #ORM_VERSION = '7.1.9-dev.11';
/**

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