Commit f5ed5ba1 authored by Ermolaev Timur's avatar Ermolaev Timur

#158 добавил каскадное удаление

parent ff13887b
......@@ -77,7 +77,7 @@ import { DateTimeTask } from './DateTimeTask';
@ManyToOne(() =>User, (user: { tasks: Task[]}) => user.tasks,{nullable: true,cascade: true, onUpdate:'CASCADE', eager : true,})
executor!: User;
@ManyToOne(()=>Project,(project:{tasks: Task[]}) => project.tasks,{eager : true,nullable: true,onUpdate:'CASCADE'})
@ManyToOne(()=>Project,(project:{tasks: Task[]}) => project.tasks,{eager : true,nullable: true,onUpdate:'CASCADE', onDelete: 'CASCADE'})
project!: Project;
@OneToMany(() => DateTimeTask, (dateTimeTask: { task: Task }) => dateTimeTask.task,{eager : true,nullable: true,onUpdate:'CASCADE'})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment