Skip to main content
Version: Next

Interface: IWrappedEntity<T, PK, P>

core.IWrappedEntity

Type parameters#

NameType
TT: AnyEntity<T>
PKPK: keyof T | unknown = PrimaryProperty<T>
PP: Populate<T> | unknown = unknown

Implemented by#

Methods#

assign#

assign(data, options?): T

Parameters#

NameType
dataany
options?boolean | AssignOptions

Returns#

T

Defined in#

packages/core/src/typings.ts:90


init#

init<P>(populated?, populate?, lockMode?): Promise<T>

Type parameters#

NameType
PP: Populate<T> = Populate<T>

Parameters#

NameType
populated?boolean
populate?P
lockMode?LockMode

Returns#

Promise<T>

Defined in#

packages/core/src/typings.ts:85


isInitialized#

isInitialized(): boolean

Returns#

boolean

Defined in#

packages/core/src/typings.ts:83


populated#

populated(populated?): void

Parameters#

NameType
populated?boolean

Returns#

void

Defined in#

packages/core/src/typings.ts:84


toJSON#

toJSON(...args): EntityDTO<T>

Parameters#

NameType
...argsany[]

Returns#

EntityDTO<T>

Defined in#

packages/core/src/typings.ts:88


toObject#

toObject(ignoreFields?): EntityDTO<T>

Parameters#

NameType
ignoreFields?string[]

Returns#

EntityDTO<T>

Defined in#

packages/core/src/typings.ts:87


toPOJO#

toPOJO(): EntityDTO<T>

Returns#

EntityDTO<T>

Defined in#

packages/core/src/typings.ts:89


toReference#

toReference<PK2, P2>(): IdentifiedReference<T, PK2> & LoadedReference<T, P2>

Type parameters#

NameType
PK2PK2: unknown = PrimaryProperty<T>
P2P2: unknown = unknown

Returns#

IdentifiedReference<T, PK2> & LoadedReference<T, P2>

Defined in#

packages/core/src/typings.ts:86