Skip to main content
Version: 6.3

EntityMetadata <T>

Index

Constructors

constructor

Properties

abstract

abstract: boolean

bidirectionalRelations

bidirectionalRelations: EntityProperty<T, any>[]

checks

checks: CheckConstraint<T>[]

class

class: EntityClass<T>

className

className: string

collection

collection: string

optionalcomment

comment?: string

comparableProps

comparableProps: EntityProperty<T, any>[]

compositePK

compositePK: boolean

concurrencyCheckKeys

concurrencyCheckKeys: Set<EntityKey<T, false>>

constructorParams

constructorParams: EntityKey<T, false>[]

definedProperties

definedProperties: Dictionary<any>

optionaldiscriminatorColumn

discriminatorColumn?: AnyString | EntityKey<T, false>

optionaldiscriminatorMap

discriminatorMap?: Dictionary<string>

optionaldiscriminatorValue

discriminatorValue?: string | number

embeddable

embeddable: boolean

optionalexpression

expression?: string | (em: any, where: FilterQuery<T>, options: FindOptions<T, any, any, any>) => MaybePromise<string | object>

extends

extends: string

filters

filters: Dictionary<FilterDef>

forceConstructor

forceConstructor: boolean

getterProps

getterProps: EntityProperty<T, any>[]

optionalhasUniqueProps

hasUniqueProps?: boolean

hooks

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

Type declaration

hydrateProps

hydrateProps: EntityProperty<T, any>[]

indexes

indexes: { expression?: string; name?: string; options?: Dictionary<any>; properties: EntityKey<T, false> | EntityKey<T, false>[]; type?: string }[]

optionalname

name?: string

path

path: string

optionalpivotTable

pivotTable?: boolean

optionalpolymorphs

polymorphs?: EntityMetadata<any>[]

primaryKeys

primaryKeys: EntityKey<T, false>[]

properties

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

readonlypropertyOrder

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

props

props: EntityProperty<T, any>[]

prototype

prototype: T

optionalreadonly

readonly?: boolean

referencingProperties

referencingProperties: { meta: EntityMetadata<T>; prop: EntityProperty<T, any> }[]

relations

relations: EntityProperty<T, any>[]

repository

repository: () => EntityClass<EntityRepository<any>>

Type declaration

optionalrepositoryClass

repositoryClass?: string

root

optionalschema

schema?: string

optionalselfReferencing

selfReferencing?: boolean

serializedPrimaryKey

serializedPrimaryKey: EntityKey<T, false>

simplePK

simplePK: boolean

tableName

tableName: string

toJsonParams

toJsonParams: string[]

trackingProps

trackingProps: EntityProperty<T, any>[]

uniqueProps

uniqueProps: EntityProperty<T, any>[]

uniques

uniques: { deferMode?: DeferMode; expression?: string; name?: string; options?: Dictionary<any>; properties: EntityKey<T, false> | EntityKey<T, false>[] }[]

useCache

useCache: boolean

versionProperty

versionProperty: EntityKey<T, false>

optionalvirtual

virtual?: boolean

Accessors

tableName

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

  • Parameters

    • name: string

    Returns void

Methods

addProperty

  • addProperty(prop: Partial<EntityProperty<T, any>>, sync?: boolean): void
  • Parameters

    Returns void

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