From 8bc2e832464cd0135d2e871f3131b69940ecf33b Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 13 Dec 2021 21:55:26 -0500 Subject: fix(grfn/bbbg): Left join to attendees Change-Id: Ic158a2c77e92410f078b67907b2a9537e2cb1392 --- users/grfn/bbbg/src/bbbg/db/event.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/grfn/bbbg/src/bbbg/db/event.clj b/users/grfn/bbbg/src/bbbg/db/event.clj index a2aa30fd0dad..0fd0e3ec0795 100644 --- a/users/grfn/bbbg/src/bbbg/db/event.clj +++ b/users/grfn/bbbg/src/bbbg/db/event.clj @@ -3,7 +3,7 @@ [bbbg.attendee :as attendee] [bbbg.db :as db] [bbbg.event :as event] - [honeysql.helpers :refer [merge-group-by merge-join merge-select]] + [honeysql.helpers :refer [merge-group-by merge-left-join merge-select]] [java-time :refer [local-date]])) (defn create! [db event] @@ -34,7 +34,7 @@ (defn with-attendee-counts [query] (-> query - (merge-join :event_attendee [:= :event.id :event_attendee.event-id]) + (merge-left-join :event_attendee [:= :event.id :event_attendee.event-id]) (merge-select :%count.event_attendee.attendee_id) (merge-group-by :event.id :event_attendee.event-id))) -- cgit 1.4.1