about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-12-14T02·55-0500
committerGriffin Smith <grfn@gws.fyi>2021-12-14T02·55-0500
commit8bc2e832464cd0135d2e871f3131b69940ecf33b (patch)
tree124edf56e3940944e86a34a8e8463f4bbc9cd4f8
parentc3cb7b0df82479016c252ef45a302f566bd569f6 (diff)
fix(grfn/bbbg): Left join to attendees r/3234
Change-Id: Ic158a2c77e92410f078b67907b2a9537e2cb1392
-rw-r--r--users/grfn/bbbg/src/bbbg/db/event.clj4
1 files 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)))