We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f99d81 commit d1161faCopy full SHA for d1161fa
1 file changed
lib/ecto.ex
@@ -527,6 +527,7 @@ defmodule Ecto do
527
|> Enum.filter(&assert_struct!(schema, &1))
528
|> Enum.map(fn struct ->
529
case owner_key do
530
+ single_key when is_atom(single_key) -> Map.fetch!(struct, single_key)
531
[single_key] -> Map.fetch!(struct, single_key)
532
[_ | _] -> owner_key |> Enum.map(&Map.fetch!(struct, &1)) # |> List.to_tuple()
533
end
0 commit comments