Version: 4.3

Class: EntityAssigner

Hierarchy

  • EntityAssigner

Methods

assign

Staticassign<T>(entity: T, data: EntityData<T>, options?: AssignOptions): T

Defined in packages/core/src/entity/EntityAssigner.ts:14

Type parameters:

NameType
TAnyEntity<T>

Parameters:

NameType
entityT
dataEntityData<T>
options?AssignOptions

Returns: T

Staticassign<T>(entity: T, data: EntityData<T>, onlyProperties?: boolean): T

Defined in packages/core/src/entity/EntityAssigner.ts:15

Type parameters:

NameType
TAnyEntity<T>

Parameters:

NameType
entityT
dataEntityData<T>
onlyProperties?boolean

Returns: T


assignCollection

Static PrivateassignCollection<T, U>(entity: T, collection: Collection<U>, value: any[], prop: EntityProperty, em: EntityManager, options: AssignOptions): void

Defined in packages/core/src/entity/EntityAssigner.ts:114

Type parameters:

NameTypeDefault
TAnyEntity<T>-
UAnyEntity<U>AnyEntity

Parameters:

NameType
entityT
collectionCollection<U>
valueany[]
propEntityProperty
emEntityManager
optionsAssignOptions

Returns: void


assignReference

Static PrivateassignReference<T>(entity: T, value: any, prop: EntityProperty, em: EntityManager, options: AssignOptions): void

Defined in packages/core/src/entity/EntityAssigner.ts:97

Type parameters:

NameType
TAnyEntity<T>

Parameters:

NameType
entityT
valueany
propEntityProperty
emEntityManager
optionsAssignOptions

Returns: void


autoWireOneToOne

StaticautoWireOneToOne<T>(prop: EntityProperty, entity: T): void

Defined in packages/core/src/entity/EntityAssigner.ts:71

auto-wire 1:1 inverse side with owner as in no-sql drivers it can't be joined also makes sure the link is bidirectional when creating new entities from nested structures

internal

Type parameters:

NameType
TAnyEntity<T>

Parameters:

NameType
propEntityProperty
entityT

Returns: void


createCollectionItem

Static PrivatecreateCollectionItem<T>(item: any, em: EntityManager, prop: EntityProperty, invalid: any[], options: AssignOptions): T

Defined in packages/core/src/entity/EntityAssigner.ts:126

Type parameters:

NameType
TAnyEntity<T>

Parameters:

NameType
itemany
emEntityManager
propEntityProperty
invalidany[]
optionsAssignOptions

Returns: T


validateEM

Static PrivatevalidateEM(em?: EntityManager): boolean

Defined in packages/core/src/entity/EntityAssigner.ts:89

Parameters:

NameType
em?EntityManager

Returns: boolean

Last updated on by Martin Adámek