From 6e88e9a8a1158ad28450124021cfd6294c63ab44 Mon Sep 17 00:00:00 2001 From: L4168 <L4168@student.jamk.fi> Date: Thu, 27 Jun 2019 11:42:55 +0300 Subject: [PATCH] added relation to task entity --- src/game/game.entity.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/game.entity.ts b/src/game/game.entity.ts index 3b36297..036b31c 100644 --- a/src/game/game.entity.ts +++ b/src/game/game.entity.ts @@ -12,10 +12,8 @@ import { import { PersonEntity } from '../user/user.entity'; import { GameGroupEntity } from './group.entity'; import { FactionEntity } from './faction.entity'; -import { - MapDrawingEntity, - Game_Person_MapDrawingEntity, -} from './coordinate.entity'; +import { MapDrawingEntity } from './coordinate.entity'; +import { TaskEntity } from '../task/task.entity'; // table that stores all created games @Entity('Game') @@ -40,6 +38,8 @@ export class GameEntity { objective_points => objective_points.game, ) objective_points: ObjectivePointEntity[]; + @OneToMany(type => TaskEntity, tasks => tasks.taskGame) + tasks: TaskEntity[]; gameObject() { const { id, name } = this; -- GitLab