Version: 4.3

Interface: IHydrator

Hierarchy

  • IHydrator

Implemented by

Methods

hydrate

hydrate<T>(entity: T, meta: EntityMetadata<T>, data: EntityData<T>, factory: EntityFactory, type: "full" | "returning" | "reference", newEntity?: boolean, convertCustomTypes?: boolean): void

Defined in packages/core/src/typings.ts:434

Hydrates the whole entity. This process handles custom type conversions, creating missing Collection instances, mapping FKs to entity instances, as well as merging those entities.

Type parameters:

NameType
TAnyEntity<T>

Parameters:

NameType
entityT
metaEntityMetadata<T>
dataEntityData<T>
factoryEntityFactory
type"full" | "returning" | "reference"
newEntity?boolean
convertCustomTypes?boolean

Returns: void


hydrateReference

hydrateReference<T>(entity: T, meta: EntityMetadata<T>, data: EntityData<T>, factory: EntityFactory, convertCustomTypes?: boolean): void

Defined in packages/core/src/typings.ts:447

Hydrates primary keys only

Type parameters:

NameType
TAnyEntity<T>

Parameters:

NameType
entityT
metaEntityMetadata<T>
dataEntityData<T>
factoryEntityFactory
convertCustomTypes?boolean

Returns: void

Last updated on by Martin Adámek