#45 fix eager in Task model

parent f36739fe
......@@ -65,7 +65,7 @@ import {
@ManyToOne(() => User, (user: { projects: Project[]; }) => user.projects,{eager : true})
admin!: User;
@OneToMany(() => Task, (task: { project: Project; })=>task.project,{eager : true})
@OneToMany(() => Task, (task: { project: Project; })=>task.project)
tasks!:Task[]|null;
@ManyToMany(() => User, (user: { projects: Project[]; }) => user.projects,{eager : true,cascade: true, onUpdate:'CASCADE',onDelete: 'CASCADE'})
......
......@@ -64,10 +64,10 @@ import {
@ManyToOne(() => User, (user: { tasks: Task[]; }) => user.tasks,{eager : true})
author!: User;
@ManyToMany(() => User,{eager : true, cascade: true, onUpdate:'CASCADE',onDelete: 'CASCADE'})
@ManyToMany(() => User,{eager : true, cascade: true, onUpdate:'CASCADE'})
@JoinTable()
executors!: User[];
@ManyToOne(()=>Project,(project:{tasks: Task[]}) => project.tasks)
@ManyToOne(()=>Project,(project:{tasks: Task[]}) => project.tasks,{eager : true,nullable: true})
project!: Project | null;
}
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