Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
planner-team-one
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Евгений Положенцев
planner-team-one
Commits
6142151f
Commit
6142151f
authored
Nov 15, 2022
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#45
fix eager in Task model
parent
f36739fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Project.ts
planner-api/src/models/Project.ts
+1
-1
Task.ts
planner-api/src/models/Task.ts
+2
-2
No files found.
planner-api/src/models/Project.ts
View file @
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'
})
...
...
planner-api/src/models/Task.ts
View file @
6142151f
...
@@ -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
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment