Fix cannot read property joinColumns of undefined

This commit is contained in:
Jerko Steiner 2019-09-18 15:37:35 +07:00
parent d4378719c5
commit 2ad72d2925
2 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,7 @@ export const TeamEntity = new EntitySchema<Team>({
userTeams: {
type: 'one-to-many',
target: 'user_team',
inverseSide: 'team',
},
},
indices: [{

View File

@ -23,14 +23,17 @@ export const UserEntity = new EntitySchema<User>({
emails: {
type: 'one-to-many',
target: 'user_email',
inverseSide: 'user',
},
sessions: {
type: 'one-to-many',
target: 'session',
inverseSide: 'user',
},
userTeams: {
type: 'one-to-many',
target: 'team',
inverseSide: 'user',
},
},
})