Skip to main content
Version: Next

EntityMetadataWithProperties <TName, TTableName, TProperties, TPK, TBase>

Hierarchy

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

Index

Properties

optionalinheritedabstract

abstract?: boolean

optionalinheritedbidirectionalRelations

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

optionalinheritedchecks

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

optionalinheritedclass

class?: EntityCtor<InferEntityFromProperties<TProperties, TPK, TBase>>

optionalinheritedclassName

className?: string

optionalinheritedcollection

collection?: string

optionalinheritedcomment

comment?: string

optionalinheritedcomparableProps

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

optionalinheritedcompositePK

compositePK?: boolean

optionalconcurrencyCheckKeys

concurrencyCheckKeys?: Set<keyof TProperties>

optionalinheritedconstructorParams

constructorParams?: (typeof PrimaryKeyProp | keyof TProperties | keyof IsNever<TBase, true, false> extends true ? {} : Omit<TBase, typeof PrimaryKeyProp>)[]

optionalinheriteddefinedProperties

definedProperties?: Dictionary<any>

optionaldiscriminatorColumn

discriminatorColumn?: keyof TProperties

optionalinheriteddiscriminatorMap

discriminatorMap?: Dictionary<EntityClass<any>>

optionalinheriteddiscriminatorValue

discriminatorValue?: string | number

optionalinheritedembeddable

embeddable?: boolean

optionalinheritedexpression

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

optionalextends

extends?: EntityName<TBase>

optionalinheritedfilters

filters?: Dictionary<FilterDef<any>>

optionalinheritedforceConstructor

forceConstructor?: boolean

optionalinheritedgetterProps

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

optionalinheritedhasTriggers

hasTriggers?: boolean

optionalinheritedhasUniqueProps

hasUniqueProps?: boolean

optionalhooks

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

optionalinheritedhydrateProps

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

optionalindexes

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

name

name: TName

optionalinheritedpath

path?: string

optionalinheritedpivotTable

pivotTable?: boolean

optionalinheritedpolymorphs

polymorphs?: EntityMetadata<any, EntityCtor<any>>[]

optionalprimaryKeys

primaryKeys?: TPK & InferPrimaryKey<TProperties>[]

properties

properties: TProperties | (properties) => TProperties

optionalreadonlyinheritedpropertyOrder

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

optionalinheritedprops

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

optionalinheritedprototype

prototype?: InferEntityFromProperties<TProperties, TPK, TBase>

optionalinheritedreadonly

readonly?: boolean

optionalinheritedreferencingProperties

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

optionalinheritedrelations

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

optionalinheritedrepository

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

Type declaration

optionalinheritedrepositoryClass

repositoryClass?: string

optionalinheritedroot

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

optionalinheritedschema

schema?: string

optionalinheritedselfReferencing

selfReferencing?: boolean

optionalserializedPrimaryKey

serializedPrimaryKey?: keyof TProperties

optionalinheritedsimplePK

simplePK?: boolean

optionaltableName

tableName?: TTableName

optionalinheritedtrackingProps

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

inheriteduniqueName

uniqueName: undefined | string

optionalinheriteduniqueProps

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

optionaluniques

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

optionalinheritedvalidateProps

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

optionalversionProperty

versionProperty?: keyof TProperties

optionalinheritedvirtual

virtual?: boolean

Methods

optionalinheritedaddProperty

  • addProperty(prop): void

optionalinheritedcreateColumnMappingObject

  • Returns Dictionary<any>

optionalinheritedgetPrimaryProp

optionalinheritedgetPrimaryProps

optionalinheritedremoveProperty

  • removeProperty(name, sync): void
  • Parameters

    • name: string
    • sync: boolean = true

    Returns void

optionalinheritedsync

  • sync(initIndexes, config): void