Skip to main content
Version: 6.3

EntitySchema <Entity, Base>

Index

Constructors

constructor

  • new EntitySchema<Entity, Base>(meta): EntitySchema<Entity, Base>

Properties

staticREGISTRY

REGISTRY: Map<Partial<any>, EntitySchema<any, never>> = ...

When schema links the entity class via class option, this registry allows the lookup from opposite side, so we can use the class in entities option just like the EntitySchema instance.

Accessors

meta

name

Methods

addEmbedded

  • addEmbedded<Target>(name, options): void

addEnum

  • addEnum(name, type, options): void
  • Parameters

    Returns void

addIndex

  • addIndex(options): void

addManyToMany

  • addManyToMany<Target>(name, type, options): void
  • Type parameters

    • Target = Partial<any>

    Parameters

    Returns void

addManyToOne

  • addManyToOne<Target>(name, type, options): void
  • Type parameters

    • Target = Partial<any>

    Parameters

    Returns void

addOneToMany

  • addOneToMany<Target>(name, type, options): void
  • Type parameters

    • Target = Partial<any>

    Parameters

    Returns void

addOneToOne

  • addOneToOne<Target>(name, type, options): void
  • Type parameters

    • Target = Partial<any>

    Parameters

    Returns void

addPrimaryKey

  • addPrimaryKey(name, type, options): void

addProperty

  • addProperty(name, type, options): void

addSerializedPrimaryKey

  • addSerializedPrimaryKey(name, type, options): void

addUnique

  • addUnique(options): void

addVersion

  • addVersion(name, type, options): void

setClass

  • setClass(proto): void

setCustomRepository

  • setCustomRepository(repository): void

setExtends

  • setExtends(base): void
  • Parameters

    Returns void

staticfromMetadata