Skip to content

Commit 7e60edc

Browse files
committed
Clarify error message, closes #4499
1 parent cba4947 commit 7e60edc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/ecto/query/planner.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,7 +2197,8 @@ defmodule Ecto.Query.Planner do
21972197
{{:source, {source, schema}, prefix || query.prefix, types}, fields}
21982198

21992199
{{:ok, {_, fields}}, _} ->
2200-
{{:map, Enum.map(fields, &{&1, {:value, :any}})}, Enum.map(fields, &select_field(&1, ix, :always))}
2200+
{{:map, Enum.map(fields, &{&1, {:value, :any}})},
2201+
Enum.map(fields, &select_field(&1, ix, :always))}
22012202

22022203
{:error, {:fragment, _, _}} ->
22032204
{{:value, :map}, [{:&, [], [ix]}]}
@@ -2299,8 +2300,8 @@ defmodule Ecto.Query.Planner do
22992300
_ ->
23002301
error!(
23012302
query,
2302-
"can only preload sources with a schema" <>
2303-
"(fragments, binaries and subqueries that do not select a schema are not supported)"
2303+
"can only preload sources with a schema " <>
2304+
"(fragments, binaries, and subqueries that do not select a from/join schema are not supported)"
23042305
)
23052306
end
23062307
end

0 commit comments

Comments
 (0)