Skip to main content
Version: 5.3

EntityProperty <T>

Index

Properties

optionalarray

array?: boolean

optionalautoincrement

autoincrement?: boolean

cascade

cascade: Cascade[]

columnTypes

columnTypes: string[]

optionalcomment

comment?: string

optionalconcurrencyCheck

concurrencyCheck?: boolean

optionalcustomOrder

customOrder?: string[] | number[] | boolean[]

customType

customType: Type<any, any>

optionaldefault

default?: null | string | number | boolean

optionaldefaultRaw

defaultRaw?: string

optionaldiscriminatorColumn

discriminatorColumn?: string

optionaleager

eager?: boolean

embeddable

embeddable: Constructor<T>

optionalembedded

embedded?: [string, string]

embeddedProps

embeddedProps: Dictionary<EntityProperty<any>>

entity

entity: () => EntityName<T>

Type declaration

optionalenum

enum?: boolean

optionalextra

extra?: string

mysql only

optionalfieldNameRaw

fieldNameRaw?: string

fieldNames

fieldNames: string[]

optionalfixedOrder

fixedOrder?: boolean

optionalfixedOrderColumn

fixedOrderColumn?: string

optionalformula

formula?: (alias: string) => string

Type declaration

    • (alias: string): string
    • Parameters

      • alias: string

      Returns string

optionalgetter

getter?: boolean

optionalgetterName

getterName?: keyof T

optionalhidden

hidden?: boolean

optionalindex

index?: string | boolean

optionalinherited

inherited?: boolean

inverseJoinColumns

inverseJoinColumns: string[]

inversedBy

inversedBy: string

optionalitems

items?: (string | number)[]

joinColumns

joinColumns: string[]

optionallazy

lazy?: boolean

optionallength

length?: number

optionalmapToPk

mapToPk?: boolean

mappedBy

mappedBy: string

name

name: string & keyof T

optionalnullable

nullable?: boolean

optionalobject

object?: boolean

optionalonCreate

onCreate?: (entity: T) => any

Type declaration

    • (entity: T): any
    • Parameters

      • entity: T

      Returns any

optionalonDelete

onDelete?: AnyString | cascade | no action | set null | set default

optionalonUpdate

onUpdate?: (entity: T) => any

Type declaration

    • (entity: T): any
    • Parameters

      • entity: T

      Returns any

optionalonUpdateIntegrity

onUpdateIntegrity?: AnyString | cascade | no action | set null | set default

optionalorderBy

orderBy?: QueryOrderMap<T> | QueryOrderMap<T>[]

optionalorphanRemoval

orphanRemoval?: boolean

owner

owner: boolean

optionalpersist

persist?: boolean

pivotEntity

pivotEntity: string

pivotTable

pivotTable: string

optionalprecision

precision?: number

optionalprefix

prefix?: string | boolean

optionalprimary

primary?: boolean

reference

reference: ReferenceType

referencedColumnNames

referencedColumnNames: string[]

referencedPKs

referencedPKs: string[]

referencedTableName

referencedTableName: string

optionalscale

scale?: number

optionalserializedName

serializedName?: string

serializedPrimaryKey

serializedPrimaryKey: boolean

optionalserializer

serializer?: (value: any) => any

Type declaration

    • (value: any): any
    • Parameters

      • value: any

      Returns any

optionalsetter

setter?: boolean

optionalstrategy

strategy?: LoadStrategy

optionaltargetMeta

targetMeta?: EntityMetadata<any>

optionaltrackChanges

trackChanges?: boolean

type

type: string | bigint | boolean | integer | decimal | json | date | array | text | time | uuid | datetime | blob | enumArray | enum | smallint | tinyint | mediumint | float | double | AnyString

optionalunique

unique?: string | boolean

optionalunsigned

unsigned?: boolean

optionaluserDefined

userDefined?: boolean

optionalversion

version?: boolean

optionalwrappedReference

wrappedReference?: boolean