New:Socket for Asana Is Now Available.Learn more
Get Started

@mikro-orm/core

Package Overview
Dependencies
Maintainers
1
Versions
4768
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.2.0-dev.10
to
7.2.0-dev.11
+4
-5
entity/EntityRepository.d.ts
import type { PopulatePath } from '../enums.js';
import type { CreateOptions, EntityManager, MergeOptions } from '../EntityManager.js';
import type { CreateOptions, EntityManager, MapOptions, MergeOptions } from '../EntityManager.js';
import type { AssignOptions } from './EntityAssigner.js';

@@ -118,7 +118,6 @@ import type { Dictionary, EntityData, EntityDictionary, EntityKey, EntityName, FilterQuery, Loaded, Primary, AutoPath, RequiredEntityData, Ref, EntityType, EntityDTO, MergeSelected, FromEntityType, IsSubset, MergeLoaded, ArrayElement, IndexFilterQuery, WithUsingOptions } from '../typings.js';

/**
* Maps raw database result to an entity and merges it to this EntityManager.
* Maps raw database result to an entity and merges it to this EntityManager by default.
* Use `disableIdentityMap` to return an isolated entity without affecting the current context.
*/
map(result: EntityDictionary<Entity>, options?: {
schema?: string;
}): Entity;
map(result: EntityDictionary<Entity>, options?: Omit<MapOptions, 'mapped'>): Entity;
/**

@@ -125,0 +124,0 @@ * Gets a reference to the entity identified by the given type and alternate key property without actually loading it.

@@ -134,3 +134,4 @@ import { ValidationError } from '../errors.js';

/**
* Maps raw database result to an entity and merges it to this EntityManager.
* Maps raw database result to an entity and merges it to this EntityManager by default.
* Use `disableIdentityMap` to return an isolated entity without affecting the current context.
*/

@@ -137,0 +138,0 @@ map(result, options) {

@@ -378,8 +378,6 @@ import { type Configuration } from './utils/Configuration.js';

/**
* Maps raw database result to an entity and merges it to this EntityManager.
* Maps raw database result to an entity and merges it to this EntityManager by default.
* Use `disableIdentityMap` to return an isolated entity without affecting the current context.
*/
map<Entity extends object>(entityName: EntityName<Entity>, result: EntityDictionary<Entity>, options?: {
schema?: string;
mapped?: boolean;
}): Entity;
map<Entity extends object>(entityName: EntityName<Entity>, result: EntityDictionary<Entity>, options?: MapOptions): Entity;
/**

@@ -671,2 +669,10 @@ * Merges given entity to this EntityManager so it becomes managed. You can force refreshing of existing entities

}
export interface MapOptions {
/** schema to use when mapping the entity */
schema?: string;
/** set to true when the result is already mapped to entity property names */
mapped?: boolean;
/** map the entity in an isolated context without adding it to the identity map */
disableIdentityMap?: boolean;
}
export interface MergeOptions {

@@ -673,0 +679,0 @@ refresh?: boolean;

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

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

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

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

Sorry, the diff of this file is too big to display