🎩 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.12
to
7.1.9-dev.13
+1
-1
package.json
{
"name": "@mikro-orm/core",
"version": "7.1.9-dev.12",
"version": "7.1.9-dev.13",
"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": [

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

import { isRaw } from '../utils/RawQueryFragment.js';
import { Utils } from '../utils/Utils.js';
import { equals, Utils } from '../utils/Utils.js';
import { OptimisticLockError, ValidationError } from '../errors.js';

@@ -342,3 +342,4 @@ import { ReferenceKind } from '../enums.js';

if (res.length !== changeSets.length) {
const compare = (a, b, keys) => keys.every(k => a[k] === b[k]);
// a FK pointing to a composite PK is an array, so the values need to be compared deeply
const compare = (a, b, keys) => keys.every(k => equals(a[k], b[k]));
const entity = changeSets.find(cs => {

@@ -345,0 +346,0 @@ return !res.some(row => compare(Utils.getPrimaryKeyCond(cs.entity, primaryKeys), row, primaryKeys));

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

static PK_SEPARATOR = '~~~';
static #ORM_VERSION = '7.1.9-dev.12';
static #ORM_VERSION = '7.1.9-dev.13';
/**

@@ -466,3 +466,5 @@ * Checks if the argument is instance of `Object`. Returns false for arrays.

const cond = primaryKeys.reduce((o, pk) => {
o[pk] = Utils.extractPK(entity[pk]);
const value = entity[pk];
// FKs pointing to a composite PK are arrays, which `extractPK` rejects
o[pk] = Utils.isPrimaryKey(value, true) ? value : Utils.extractPK(value);
return o;

@@ -469,0 +471,0 @@ }, {});