abstractBaseEntity
Index
Constructors
constructor
Returns BaseEntity
Methods
assign
Type parameters
- Entity: BaseEntity
- Naked: BaseEntity = FromEntityType<Entity>
- Convert: boolean = false
- Data: EntityData<Naked, Convert> | Partial<EntityDTO<Naked>> = EntityData<Naked, Convert> | Partial<EntityDTO<Naked>>
Parameters
data: Data & IsSubset<EntityData<Naked>, Data>
options: AssignOptions<Convert> = {}
Returns MergeSelected<Entity, Naked, keyof Data & string>
getSchema
Returns undefined | string
init
Type parameters
- Entity: BaseEntity = BaseEntity
- Hint: string = never
- Fields: string = *
- Excludes: string = never
Parameters
optionaloptions: FindOneOptions<Entity, Hint, Fields, Excludes>
Returns Promise<null | Loaded<Entity, Hint, Fields, Excludes>>
isInitialized
Returns boolean
isTouched
Returns boolean
populate
Type parameters
- Entity: BaseEntity = BaseEntity
- Hint: string = never
Parameters
populate: false | AutoPath<Entity, Hint, never, 9>[]
options: EntityLoaderOptions<Entity> = {}
Returns Promise<Loaded<Entity, Hint>>
populated
Parameters
populated: boolean = true
Returns void
serialize
Type parameters
- Entity: BaseEntity = BaseEntity
- Hint: string = never
- Exclude: string = never
Parameters
optionaloptions: SerializeOptions<Entity, Hint, Exclude>
Returns EntityDTO<Loaded<Entity, Hint>>
setSchema
Parameters
optionalschema: string
Returns void
toObject
Type parameters
- Entity: BaseEntity = BaseEntity
Returns EntityDTO<Entity>
toPOJO
Type parameters
- Entity: BaseEntity = BaseEntity
Returns EntityDTO<Entity>
toReference
Type parameters
- Entity: BaseEntity = BaseEntity
Returns Reference<Entity> & LoadedReference<Loaded<Entity, AddEager<Entity>>>