Skip to main content
Version: 5.2

EntityMetadata <T>

Index

Constructors

constructor

Properties

abstract

abstract: boolean

bidirectionalRelations

bidirectionalRelations: EntityProperty<T>[]

checks

checks: CheckConstraint<T>[]

class

class: Constructor<T>

className

className: string

collection

collection: string

optionalcomment

comment?: string

comparableProps

comparableProps: EntityProperty<T>[]

compositePK

compositePK: boolean

concurrencyCheckKeys

concurrencyCheckKeys: Set<keyof T & string>

constructorParams

constructorParams: string[]

definedProperties

definedProperties: Dictionary<any>

optionaldiscriminatorColumn

discriminatorColumn?: string

optionaldiscriminatorMap

discriminatorMap?: Dictionary<string>

optionaldiscriminatorValue

discriminatorValue?: string | number

embeddable

embeddable: boolean

extends

extends: string

filters

filters: Dictionary<FilterDef>

forceConstructor

forceConstructor: boolean

hooks

hooks: { afterCreate: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; afterDelete: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; afterFlush: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; afterTransactionCommit: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; afterTransactionRollback: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; afterTransactionStart: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; afterUpdate: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; beforeCreate: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; beforeDelete: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; beforeFlush: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; beforeTransactionCommit: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; beforeTransactionRollback: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; beforeTransactionStart: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; beforeUpdate: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; onFlush: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; onInit: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[]; onLoad: undefined | (undefined | keyof T | (args: EventArgs<T>) => void | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: EventArgs<T>) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: FlushEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void> | (args: TransactionEventArgs) => Promise<void>)[] }

Type declaration

hydrateProps

hydrateProps: EntityProperty<T>[]

indexes

indexes: { expression?: string; name?: string; options?: Dictionary<any>; properties: (keyof T & string) | (keyof T & string)[]; type?: string }[]

optionalname

name?: string

path

path: string

pivotTable

pivotTable: boolean

optionalpolymorphs

polymorphs?: EntityMetadata<any>[]

primaryKeys

primaryKeys: (keyof T & string)[]

properties

properties: { [ K in string ]: EntityProperty<T> }

readonlypropertyOrder

propertyOrder: Map<string, number> = ...

props

props: EntityProperty<T>[]

prototype

prototype: T

optionalreadonly

readonly?: boolean

relations

relations: EntityProperty<T>[]

root

optionalschema

schema?: string

optionalselfReferencing

selfReferencing?: boolean

serializedPrimaryKey

serializedPrimaryKey: keyof T & string

tableName

tableName: string

toJsonParams

toJsonParams: string[]

uniqueProps

uniqueProps: EntityProperty<T>[]

uniques

uniques: { name?: string; options?: Dictionary<any>; properties: (keyof T & string) | (keyof T & string)[] }[]

useCache

useCache: boolean

versionProperty

versionProperty: keyof T & string

Accessors

tableName

  • get tableName(): string
  • set tableName(name: string): void
  • Returns string

  • Parameters

    • name: string

    Returns void

Methods

addProperty

customRepository

getPrimaryProps

removeProperty

  • removeProperty(name: string, sync?: boolean): void
  • Parameters

    • name: string
    • sync: boolean = true

    Returns void

sync

  • sync(initIndexes?: boolean): void
  • Parameters

    • initIndexes: boolean = false

    Returns void