Skip to content

Commit 8c799cb

Browse files
committed
Use left_join when building search query. This allows more consistent search results across preloads when they are nil.
1 parent fc54f1c commit 8c799cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/kaffy/resource_query.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ defmodule Kaffy.ResourceQuery do
128128

129129
Enum.reduce(search_fields, query, fn
130130
{association, fields}, q ->
131-
query = from(s in q, join: a in assoc(s, ^association))
131+
query = from(s in q, left_join: a in assoc(s, ^association))
132132

133133
Enum.reduce(fields, query, fn f, current_query ->
134134
from([..., r] in current_query,

0 commit comments

Comments
 (0)