Skip to main content
Version: 5.2

EntitySchema <T, U>

Index

Constructors

constructor

  • new EntitySchema<T, U>(meta: Metadata<T, U>): EntitySchema<T, U>

Accessors

meta

name

Methods

addEmbedded

  • Type parameters

    • K = unknown

    Parameters

    Returns void

addEnum

  • addEnum(name: string & keyof T, type?: TypeType, options?: EnumOptions<T>): void
  • Parameters

    • name: string & keyof T
    • optionaltype: TypeType
    • options: EnumOptions<T> = {}

    Returns void

addIndex

  • addIndex<T>(options: Required<Omit<IndexOptions<T>, name | type | options | expression>> & { expression?: string; name?: string; options?: Dictionary<any> }): void
  • Type parameters

    • T

    Parameters

    • options: Required<Omit<IndexOptions<T>, name | type | options | expression>> & { expression?: string; name?: string; options?: Dictionary<any> }

    Returns void

addManyToMany

  • addManyToMany<K>(name: string & keyof T, type: TypeType, options: ManyToManyOptions<K, T>): void
  • Type parameters

    • K = unknown

    Parameters

    Returns void

addManyToOne

  • addManyToOne<K>(name: string & keyof T, type: TypeType, options: ManyToOneOptions<K, T>): void
  • Type parameters

    • K = unknown

    Parameters

    Returns void

addOneToMany

  • addOneToMany<K>(name: string & keyof T, type: TypeType, options: OneToManyOptions<K, T>): void
  • Type parameters

    • K = unknown

    Parameters

    Returns void

addOneToOne

  • addOneToOne<K>(name: string & keyof T, type: TypeType, options: OneToOneOptions<K, T>): void
  • Type parameters

    • K = unknown

    Parameters

    Returns void

addPrimaryKey

  • addPrimaryKey(name: string & keyof T, type: TypeType, options?: PrimaryKeyOptions<T>): void
  • Parameters

    Returns void

addProperty

addSerializedPrimaryKey

addUnique

  • addUnique<T>(options: Required<Omit<UniqueOptions<T>, name | options | expression>> & { name?: string; options?: Dictionary<any> }): void
  • Type parameters

    • T

    Parameters

    • options: Required<Omit<UniqueOptions<T>, name | options | expression>> & { name?: string; options?: Dictionary<any> }

    Returns void

addVersion

  • addVersion(name: string & keyof T, type: TypeType, options?: PropertyOptions<T>): void
  • Parameters

    Returns void

setClass

setCustomRepository

setExtends

  • setExtends(base: string): void
  • Parameters

    • base: string

    Returns void

staticfromMetadata