#
Class: ObjectHydratorcore.ObjectHydrator
#
Hierarchy↳ ObjectHydrator
#
Constructors#
constructor+ new ObjectHydrator(metadata
: MetadataStorage, platform
: Platform, config
: Configuration<IDatabaseDriver<Connection>>): ObjectHydrator
#
Parameters:Name | Type |
---|---|
metadata | MetadataStorage |
platform | Platform |
config | Configuration<IDatabaseDriver<Connection>> |
Returns: ObjectHydrator
Inherited from: Hydrator
Defined in: packages/core/src/hydration/Hydrator.ts:8
#
Properties#
config• Protected
Readonly
config: Configuration<IDatabaseDriver<Connection>>
Inherited from: Hydrator.config
#
hydrators• Private
Readonly
hydrators: object
#
Type declaration:Name | Type |
---|---|
full | Map<string, EntityHydrator<any>> |
reference | Map<string, EntityHydrator<any>> |
returning | Map<string, EntityHydrator<any>> |
Defined in: packages/core/src/hydration/ObjectHydrator.ts:13
#
metadata• Protected
Readonly
metadata: MetadataStorage
Inherited from: Hydrator.metadata
#
platform• Protected
Readonly
platform: Platform
Inherited from: Hydrator.platform
#
Methods#
createCollectionItemMapperâ–¸ Private
createCollectionItemMapper<T>(prop
: EntityProperty<any>): string[]
#
Type parameters:Name |
---|
T |
#
Parameters:Name | Type |
---|---|
prop | EntityProperty<any> |
Returns: string[]
Defined in: packages/core/src/hydration/ObjectHydrator.ts:263
#
getEntityHydratorâ–¸ Private
getEntityHydrator<T>(meta
: EntityMetadata<T>, type
: reference | full | returning): EntityHydrator<T>
internal
Highly performance-sensitive method.
#
Type parameters:Name | Type |
---|---|
T | AnyEntity<T> |
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<T> |
type | reference | full | returning |
Returns: EntityHydrator<T>
Defined in: packages/core/src/hydration/ObjectHydrator.ts:38
#
getPropertiesâ–¸ Protected
getProperties<T>(meta
: EntityMetadata<T>, type
: reference | full | returning): EntityProperty<T>[]
#
Type parameters:Name | Type |
---|---|
T | AnyEntity<T> |
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<T> |
type | reference | full | returning |
Returns: EntityProperty<T>[]
Inherited from: Hydrator
Defined in: packages/core/src/hydration/Hydrator.ts:34
#
hydrateâ–¸ hydrate<T>(entity
: T, meta
: EntityMetadata<T>, data
: EntityData<T>, factory
: EntityFactory, type
: reference | full | returning, newEntity?
: boolean, convertCustomTypes?
: boolean): void
inheritdoc
#
Type parameters:Name | Type |
---|---|
T | AnyEntity<T> |
#
Parameters:Name | Type | Default value |
---|---|---|
entity | T | - |
meta | EntityMetadata<T> | - |
data | EntityData<T> | - |
factory | EntityFactory | - |
type | reference | full | returning | - |
newEntity | boolean | false |
convertCustomTypes | boolean | false |
Returns: void
Overrides: Hydrator
Defined in: packages/core/src/hydration/ObjectHydrator.ts:22
#
hydratePropertyâ–¸ Protected
hydrateProperty<T>(entity
: T, prop
: EntityProperty<any>, data
: EntityData<T>, factory
: EntityFactory, newEntity?
: boolean, convertCustomTypes?
: boolean): void
#
Type parameters:Name | Type |
---|---|
T | AnyEntity<T> |
#
Parameters:Name | Type |
---|---|
entity | T |
prop | EntityProperty<any> |
data | EntityData<T> |
factory | EntityFactory |
newEntity? | boolean |
convertCustomTypes? | boolean |
Returns: void
Inherited from: Hydrator
Defined in: packages/core/src/hydration/Hydrator.ts:47
#
hydrateReferenceâ–¸ hydrateReference<T>(entity
: T, meta
: EntityMetadata<T>, data
: EntityData<T>, factory
: EntityFactory, convertCustomTypes?
: boolean): void
inheritdoc
#
Type parameters:Name | Type |
---|---|
T | AnyEntity<T> |
#
Parameters:Name | Type | Default value |
---|---|---|
entity | T | - |
meta | EntityMetadata<T> | - |
data | EntityData<T> | - |
factory | EntityFactory | - |
convertCustomTypes | boolean | false |
Returns: void
Overrides: Hydrator
Defined in: packages/core/src/hydration/ObjectHydrator.ts:30