Skip to content

Commit

Permalink
don't lateral join just because we have order_bys
Browse files Browse the repository at this point in the history
  • Loading branch information
benwilson512 committed Aug 14, 2023
1 parent 63645d7 commit a1fcc9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dataloader/ecto.ex
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ if Code.ensure_loaded?(Ecto) do
records = records |> Enum.map(&Map.put(&1, field, empty))

results =
if query.limit || query.offset || Enum.any?(query.order_bys) do
if query.limit || query.offset do
records
|> preload_lateral(field, query, source.repo, repo_opts)
else
Expand Down

0 comments on commit a1fcc9e

Please sign in to comment.