Updated relationships to be nullable

ref #11 #13
This commit is contained in:
2020-12-02 19:45:02 +01:00
parent aa565c6b34
commit 4c80ab1516
17 changed files with 32 additions and 32 deletions

View File

@@ -76,12 +76,12 @@ export class Address {
/**
* Used to link the address to participants.
*/
@OneToMany(() => Participant, participant => participant.address)
@OneToMany(() => Participant, participant => participant.address, { nullable: true })
participants: Participant[];
/**
* Used to link the address to runner groups.
*/
@OneToMany(() => RunnerOrganisation, group => group.address)
@OneToMany(() => RunnerOrganisation, group => group.address, { nullable: true })
groups: RunnerOrganisation[];
}