Merge branch 'task-45-fix/projects_in_tasks' into 'development'

#45 fix eager in Task model

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