EntitySchema <Entity, Base>
Index
Constructors
constructor
Parameters
meta: EntitySchemaMetadata<Entity, Base>
Returns EntitySchema<Entity, Base>
Properties
staticREGISTRY
Accessors
meta
Returns EntityMetadata<Entity>
name
Returns EntityName<Entity>
Methods
addEmbedded
Parameters
name: EntityKey<Entity>
options: EmbeddedOptions
Returns void
addEnum
Parameters
name: EntityKey<Entity>
optionaltype: TypeType
options: EnumOptions<Entity> = {}
Returns void
addIndex
Parameters
options: IndexOptions<Entity>
Returns void
addManyToMany
Parameters
name: EntityKey<Entity>
type: TypeType
options: ManyToManyOptions<Entity, Target>
Returns void
addManyToOne
Parameters
name: EntityKey<Entity>
type: TypeType
options: ManyToOneOptions<Entity, Target>
Returns void
addOneToMany
Parameters
name: EntityKey<Entity>
type: TypeType
options: OneToManyOptions<Entity, Target>
Returns void
addOneToOne
Parameters
name: EntityKey<Entity>
type: TypeType
options: OneToOneOptions<Entity, Target>
Returns void
addPrimaryKey
Parameters
name: EntityKey<Entity>
type: TypeType
options: PrimaryKeyOptions<Entity> = {}
Returns void
addProperty
Parameters
name: EntityKey<Entity>
optionaltype: TypeType
options: PropertyOptions<Entity> | EntityProperty<Entity, any> = {}
Returns void
addSerializedPrimaryKey
Parameters
name: EntityKey<Entity>
type: TypeType
options: SerializedPrimaryKeyOptions<Entity> = {}
Returns void
addUnique
Parameters
options: UniqueOptions<Entity>
Returns void
addVersion
Parameters
name: EntityKey<Entity>
type: TypeType
options: PropertyOptions<Entity> = {}
Returns void
setClass
Parameters
proto: EntityClass<Entity>
Returns void
setCustomRepository
Parameters
repository: () => Constructor
Returns void
setExtends
Parameters
base: string | EntitySchema<any, never>
Returns void
staticfromMetadata
Parameters
meta: EntityMetadata<T> | DeepPartial<EntityMetadata<T>>
Returns EntitySchema<T, U>
When schema links the entity class via
class
option, this registry allows the lookup from opposite side, so we can use the class inentities
option just like the EntitySchema instance.