Version: 4.3

Class: BaseEntity<T, PK, P>

Type parameters

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

Hierarchy

  • BaseEntity

Implements

Constructors

constructor

+ new BaseEntity(): BaseEntity

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

Returns: BaseEntity

Methods

assign

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

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

Parameters:

NameType
dataEntityData<T>
options?AssignOptions

Returns: T


init

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

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

Parameters:

NameTypeDefault value
populatedbooleantrue

Returns: Promise<T>


isInitialized

isInitialized(): boolean

Implementation of IWrappedEntity

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

Returns: boolean


populated

populated(populated?: boolean): void

Implementation of IWrappedEntity

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

Parameters:

NameTypeDefault value
populatedbooleantrue

Returns: void


toJSON

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

Implementation of IWrappedEntity

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

Parameters:

NameType
...argsany[]

Returns: Dictionary


toObject

toObject(ignoreFields?: string[]): Dictionary

Implementation of IWrappedEntity

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

Parameters:

NameTypeDefault value
ignoreFieldsstring[][]

Returns: Dictionary


toReference

toReference(): any

Implementation of IWrappedEntity

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

Returns: any

Last updated on by Martin Adámek