From ea418b74a45b1b0146f71a73dd7aa2323417cdcd Mon Sep 17 00:00:00 2001 From: alexandre Date: Sat, 20 Apr 2024 23:38:13 +0200 Subject: [PATCH] fix jointure --- repository/database.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/repository/database.ts b/repository/database.ts index 14586b0..8cad7f5 100644 --- a/repository/database.ts +++ b/repository/database.ts @@ -406,12 +406,13 @@ export async function getDossierVotes( "id as group_id", "organeRefUid", "positionMajoritaire as group_position", + "hash", ]) .from("GroupeVotant") .as("groupeVotant"); }, "Vote.groupeVotantRefId", - "groupeVotant.group_id" + "groupeVotant.hash" ) .leftJoin( function () { @@ -427,9 +428,7 @@ export async function getDossierVotes( }, "groupeVotant.organeRefUid", "organe.organe_uid" - ) - .options({ nestTables: true }); - + ); return { votes, acts }; } catch (error) { console.error("Error fetching rows from Dossier:", error);