fix: retain sort on inputs on casting embedded inputs

improvement: show field name in NotLoaded inspect
This commit is contained in:
Zach Daniel 2024-02-12 20:46:15 -05:00
parent ac07bbf779
commit fe0058ce98
2 changed files with 8 additions and 1 deletions

View file

@ -195,6 +195,7 @@ defmodule Ash.EmbeddableType do
action,
Keyword.merge(opts,
context: context,
sorted?: true,
return_records?: true,
return_errors?: true,
batch_size: 1_000_000_000

View file

@ -11,7 +11,13 @@ defmodule Ash.NotLoaded do
import Inspect.Algebra
def inspect(not_loaded, opts) do
concat(["#Ash.NotLoaded<", to_doc(not_loaded.type, opts), ">"])
concat([
"#Ash.NotLoaded<",
to_doc(not_loaded.type, opts),
", field: ",
to_doc(not_loaded.field, opts),
">"
])
end
end
end