API 参考
    正在准备搜索索引...
    • Creates a database foreign key. Can be used on entity property or on entity. Can create foreign key with composite columns when used on entity. Warning! Don't use this with relations; relation decorators create foreign keys automatically.

      类型参数

      • T

      参数

      • typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>)
      • 可选options: ForeignKeyOptions

      返回 PropertyDecorator

    • Creates a database foreign key. Can be used on entity property or on entity. Can create foreign key with composite columns when used on entity. Warning! Don't use this with relations; relation decorators create foreign keys automatically.

      类型参数

      • T

      参数

      • typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>)
      • inverseSide: string | ((object: T) => any)
      • 可选options: ForeignKeyOptions

      返回 PropertyDecorator

    • Creates a database foreign key. Can be used on entity property or on entity. Can create foreign key with composite columns when used on entity. Warning! Don't use this with relations; relation decorators create foreign keys automatically.

      类型参数

      • T
      • C extends readonly [] | readonly string[]

      参数

      • typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>)
      • columnNames: C
      • referencedColumnNames: { [K in string | number | symbol]: string }
      • 可选options: ForeignKeyOptions

      返回 ClassDecorator