Skip to main content
Version: 4.5

core.BaseEntity

Type parameters#

NameTypeDefault
TAnyEntity<T>-
PKkeyof T-
PPopulate<T> | unknownunknown

Implements#

Constructors#

constructor#

+ new BaseEntity<T, PK, P>(): BaseEntity<T, PK, P>

Type parameters:#

NameTypeDefault
TAnyEntity<T>-
PKstring | number | symbol-
Punknownunknown

Returns: BaseEntity<T, PK, P>

Defined in: packages/core/src/entity/BaseEntity.ts:5

Methods#

assign#

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

Parameters:#

NameType
dataEntityData<T>
options?AssignOptions

Returns: T

Implementation of: IWrappedEntity

Defined in: packages/core/src/entity/BaseEntity.ts:35


init#

init(populated?: boolean): Promise<T>

Parameters:#

NameTypeDefault value
populatedbooleantrue

Returns: Promise<T>

Implementation of: IWrappedEntity

Defined in: packages/core/src/entity/BaseEntity.ts:39


isInitialized#

isInitialized(): boolean

Returns: boolean

Implementation of: IWrappedEntity

Defined in: packages/core/src/entity/BaseEntity.ts:11


populated#

populated(populated?: boolean): void

Parameters:#

NameTypeDefault value
populatedbooleantrue

Returns: void

Implementation of: IWrappedEntity

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


toJSON#

toJSON(...args: any[]): Dictionary<any>

Parameters:#

NameType
...argsany[]

Returns: Dictionary<any>

Implementation of: IWrappedEntity

Defined in: packages/core/src/entity/BaseEntity.ts:27


toObject#

toObject(ignoreFields?: string[]): Dictionary<any>

Parameters:#

NameType
ignoreFieldsstring[]

Returns: Dictionary<any>

Implementation of: IWrappedEntity

Defined in: packages/core/src/entity/BaseEntity.ts:23


toPOJO#

toPOJO(): EntityData<T>

Returns: EntityData<T>

Implementation of: IWrappedEntity

Defined in: packages/core/src/entity/BaseEntity.ts:31


toReference#

toReference(): any

Returns: any

Implementation of: IWrappedEntity

Defined in: packages/core/src/entity/BaseEntity.ts:19

Last updated on by dependabot[bot]