Sign In

@mikro-orm/core

Package Overview
Dependencies
Maintainers
1
Versions
4744
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.13-dev.5
to
7.1.13-dev.6
+7
-2
entity/EntityLoader.js

@@ -448,3 +448,6 @@ import { QueryHelper } from '../utils/QueryHelper.js';

}
if ([ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind) && items.length !== children.length) {
// a missing target row means an orphaned reference, unless the query was narrowed by a populate condition
if ([ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind) &&
items.length !== children.length &&
Utils.isEmpty(options.where)) {
const nullVal = this.#em.config.get('forceUndefined') ? undefined : null;

@@ -671,3 +674,5 @@ const itemsMap = new Set();

});
if (child.length > 0) {
// partial extraction from `$or` is unsound for to-one relations — the parent may have matched via a dropped branch
const toOne = [ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind);
if (child.length > 0 && (op === '$and' || !toOne || child.length === where[op].length)) {
subCond[op] = child;

@@ -674,0 +679,0 @@ }

{
"name": "@mikro-orm/core",
"version": "7.1.13-dev.5",
"version": "7.1.13-dev.6",
"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": [

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

static PK_SEPARATOR = '~~~';
static #ORM_VERSION = '7.1.13-dev.5';
static #ORM_VERSION = '7.1.13-dev.6';
/**

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