From fe0058ce9836ce35709f6b44c9c5fe44860ad1df Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Mon, 12 Feb 2024 20:46:15 -0500 Subject: [PATCH] fix: retain sort on inputs on casting embedded inputs improvement: show field name in NotLoaded inspect --- lib/ash/embeddable_type.ex | 1 + lib/ash/not_loaded.ex | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/ash/embeddable_type.ex b/lib/ash/embeddable_type.ex index 1677efc4..a395f7ed 100644 --- a/lib/ash/embeddable_type.ex +++ b/lib/ash/embeddable_type.ex @@ -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 diff --git a/lib/ash/not_loaded.ex b/lib/ash/not_loaded.ex index 15a1bddb..f90b0bcb 100644 --- a/lib/ash/not_loaded.ex +++ b/lib/ash/not_loaded.ex @@ -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