Skip to main content
Version: Next

EntityMetadataWithProperties <TProperties, TPK, TBase>

Hierarchy

  • Omit<Partial<EntityMetadata<InferEntityFromProperties<TProperties, TPK>>>, properties | extends | primaryKeys | hooks | discriminatorColumn | versionProperty | concurrencyCheckKeys | serializedPrimaryKey | indexes | uniques>
    • EntityMetadataWithProperties

Index

Properties

optionalinheritedabstract

abstract?: boolean

optionalinheritedbidirectionalRelations

bidirectionalRelations?: EntityProperty<InferEntityFromProperties<TProperties, TPK>, any>[]

optionalinheritedchecks

checks?: CheckConstraint<InferEntityFromProperties<TProperties, TPK>>[]

optionalinheritedclass

class?: EntityClass<InferEntityFromProperties<TProperties, TPK>>

optionalinheritedclassName

className?: string

optionalinheritedcollection

collection?: string

optionalinheritedcomment

comment?: string

optionalinheritedcomparableProps

comparableProps?: EntityProperty<InferEntityFromProperties<TProperties, TPK>, any>[]

optionalinheritedcompositePK

compositePK?: boolean

optionalconcurrencyCheckKeys

concurrencyCheckKeys?: Set<keyof TProperties>

optionalinheritedconstructorParams

constructorParams?: EntityKey<InferEntityFromProperties<TProperties, TPK>, false>[]

optionalinheriteddefinedProperties

definedProperties?: Dictionary<any>

optionaldiscriminatorColumn

discriminatorColumn?: keyof TProperties

optionalinheriteddiscriminatorMap

discriminatorMap?: Dictionary<string>

optionalinheriteddiscriminatorValue

discriminatorValue?: string | number

optionalinheritedembeddable

embeddable?: boolean

optionalinheritedexpression

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

optionalextends

extends?: EntityName<TBase>

optionalinheritedfilters

filters?: Dictionary<FilterDef>

optionalinheritedforceConstructor

forceConstructor?: boolean

optionalinheritedgetterProps

getterProps?: EntityProperty<InferEntityFromProperties<TProperties, TPK>, any>[]

optionalinheritedhasTriggers

hasTriggers?: boolean

optionalinheritedhasUniqueProps

hasUniqueProps?: boolean

optionalhooks

hooks?: DefineEntityHooks<InferEntityFromProperties<TProperties, TPK>>

optionalinheritedhydrateProps

hydrateProps?: EntityProperty<InferEntityFromProperties<TProperties, TPK>, any>[]

optionalindexes

indexes?: { expression?: string | IndexCallback<InferEntityFromProperties<TProperties, TPK>>; name?: string; options?: Dictionary; properties?: keyof TProperties | keyof TProperties[]; type?: string }[]

name

name: string

optionalinheritedpath

path?: string

optionalinheritedpivotTable

pivotTable?: boolean

optionalinheritedpolymorphs

polymorphs?: EntityMetadata<any>[]

optionalprimaryKeys

primaryKeys?: TPK & InferPrimaryKey<TProperties>[]

properties

properties: TProperties | (properties) => TProperties

optionalreadonlyinheritedpropertyOrder

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

optionalinheritedprops

props?: EntityProperty<InferEntityFromProperties<TProperties, TPK>, any>[]

optionalinheritedprototype

prototype?: InferEntityFromProperties<TProperties, TPK>

optionalinheritedreadonly

readonly?: boolean

optionalinheritedreferencingProperties

referencingProperties?: { meta: EntityMetadata<InferEntityFromProperties<TProperties, TPK>>; prop: EntityProperty<InferEntityFromProperties<TProperties, TPK>, any> }[]

optionalinheritedrelations

relations?: EntityProperty<InferEntityFromProperties<TProperties, TPK>, any>[]

optionalinheritedrepository

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

Type declaration

optionalinheritedrepositoryClass

repositoryClass?: string

optionalinheritedroot

root?: EntityMetadata<InferEntityFromProperties<TProperties, TPK>>

optionalinheritedschema

schema?: string

optionalinheritedselfReferencing

selfReferencing?: boolean

optionalserializedPrimaryKey

serializedPrimaryKey?: keyof TProperties

optionalinheritedsimplePK

simplePK?: boolean

inheritedtableName

tableName: undefined | string

optionalinheritedtoJsonParams

toJsonParams?: string[]

optionalinheritedtrackingProps

trackingProps?: EntityProperty<InferEntityFromProperties<TProperties, TPK>, any>[]

optionalinheriteduniqueProps

uniqueProps?: EntityProperty<InferEntityFromProperties<TProperties, TPK>, any>[]

optionaluniques

uniques?: { deferMode?: DeferMode | immediate | deferred; expression?: string | IndexCallback<InferEntityFromProperties<TProperties, TPK>>; name?: string; options?: Dictionary; properties?: keyof TProperties | keyof TProperties[] }[]

optionalinheriteduseCache

useCache?: boolean

optionalversionProperty

versionProperty?: keyof TProperties

optionalinheritedvirtual

virtual?: boolean

Methods

optionalinheritedaddProperty

  • addProperty(prop, sync): void

optionalinheritedcreateColumnMappingObject

  • Returns Dictionary<any>

optionalinheritedgetPrimaryProp

optionalinheritedgetPrimaryProps

optionalinheritedremoveProperty

  • removeProperty(name, sync): void
  • Parameters

    • name: string
    • sync: boolean = true

    Returns void

optionalinheritedsync

  • sync(initIndexes): void
  • Parameters

    • initIndexes: boolean = false

    Returns void