Nested Embeds
Hi,
I'm trying to create a resource with nested Embeds
e.g.
But it seems Ecto cannot load structures like this If I understood this Issue https://github.com/elixir-ecto/ecto/issues/1256 correctly.
Is this just a limitation we have to live with?
GitHub
Loading an embedded model that has a custom type field never calls ...
Given the following schema: defmodule Test.TimeEntry do use Ecto.Schema alias Timex.Ecto.DateTime schema "time_entries" do field :description, :string field :started_at, DateTime ...
4 Replies
This also means types like
time
do not work in embbeded resourcesSo, are you seeing issues around this with your Ash embeds? We don't use ecto's embed logic, we use regular types to back embeds:
And then when we load them we load the nested values.
So we ought to be able to have nested embeds/support loading whatever types when using Ash embedded resources.
I used ecto directly to bulk insert the values, but used the regular Ash Api to read the values and I got an ecto issue. Knowing that it should be possible, I'll try again and, see if I can figure out what the problem is.
Will close this for now, but feel free to reopen if you determine that its definitely an Ash issue.