Initialize the relationship metadata.
The type (constructor) of the table where this relationship was defined.
The property in Entity on which this relationship was defined.
A function that, when called, returns the referenced Entity type (constructor).
A function that, when called, returns an array consisting of the names of the local and remote properties. E.g. (user, phoneNumber) => [user.id, phoneNumber.userID] (returns ['userID', 'phoneNumberID']). The function will be passed PropertyMapTypes containing all the decorated properties of Entity and RefEntity. If the relationship between Entity and RefEntity depends on multiple columns, then an array of arrays should be returned.
The relationship type (e.g. OneToMany).
The type (constructor) of the table where this relationship was defined.
The relationship type (e.g. OneToMany).
The property in Entity on which this relationship was defined.
A function that, when called, returns an array consisting of the names of the local and remote properties. E.g. (user, phoneNumber) => [user.id, phoneNumber.userID] (returns ['userID', 'phoneNumberID']). The function will be passed PropertyMapTypes containing all the decorated properties of Entity and RefEntity. If the relationship between Entity and RefEntity depends on multiple columns, then an array of arrays should be returned.
A function that, when called, returns the referenced Entity type (constructor).
Generated using TypeDoc
Represents a relationship between two tables.