Mitigated circular dependency (to be fixed)

ref #65
This commit is contained in:
2021-01-02 18:12:18 +01:00
parent c9ba69792f
commit 1dc438beb2
8 changed files with 29 additions and 31 deletions

View File

@@ -7,10 +7,9 @@ import {
IsString
} from "class-validator";
import { Column, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn, TableInheritance } from "typeorm";
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn, TableInheritance } from "typeorm";
import { config } from '../../config';
import { Address } from "./Address";
import { Donation } from "./Donation";
/**
* Defines the Participant entity.
@@ -74,11 +73,4 @@ export abstract class Participant {
@IsOptional()
@IsEmail()
email?: string;
/**
* Used to link the participant as the donor of a donation.
* Attention: Only runner's can be associated as a distanceDonations distance source.
*/
@OneToMany(() => Donation, donation => donation.donor, { nullable: true })
donations: Donation[];
}