1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

chore: use joins instead of left joins

This commit is contained in:
Thomas Heartman 2024-09-26 10:10:06 +02:00
parent 823f6330b7
commit 2a5b8e3806
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -28,15 +28,11 @@ export class PersonalDashboardReadModel implements IPersonalDashboardReadModel {
}>('projects')
.join('role_user', 'projects.id', 'role_user.project')
.join('roles', 'role_user.role_id', 'roles.id')
.leftJoin('group_user', (join) => {
.join('group_user', (join) => {
join.on('group_user.user_id', '=', this.db.raw('?', [userId]));
})
.leftJoin(
'group_role',
'group_role.group_id',
'group_user.group_id',
)
.leftJoin(
.join('group_role', 'group_role.group_id', 'group_user.group_id')
.join(
'roles as group_roles',
'group_role.role_id',
'group_roles.id',