Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RelationshipMetaOptions<ENT_T, REF_ENT_T>

Options for the Relationship decorator. Reads "ENT_T is related to REF_ENT_T."

Type parameters

  • ENT_T

  • REF_ENT_T

Hierarchy

  • RelationshipMetaOptions

Index

Properties

Properties

cardinality

cardinality: CardinalityType

Cardinality of the relationship (e.g. OneToOne, ManyToOne, etc.).

on

on: function

How ENT_T and REF_ENT_T are related. This is a function that, given ENT_T and REF_ENT_T PropertyMapTypes, returns an array of Column-decorated property names that will be used to join the two tables. For example, joining Users (u) and PhoneNumbers (pn): (u, pn) => [u.id, pn.userID]. If the relationship is composite, then an array of arrays should be returned.

Type declaration

to

to: function

Function that returns the type of Table that this references (e.g. the constructor of the associated Table-decorated class).

Type declaration

    • (): object
    • Returns object

Generated using TypeDoc