Describe the bug
On top level List resource i would like to aggregate data from deep nested User resource.
defmodule List do
use Ash.Resource,
data_layer: AshPostgres.DataLayer
aggregates do
list(:members, [:resources, :party, :party_members, :user], :profile)
end
end
defmodule User do
use Ash.Resource,
data_layer: AshPostgres.DataLayer,
calculations do
calculate :profile, :map, expr(%{name: name, email: email})
end
end
Describe the bug On top level List resource i would like to aggregate data from deep nested User resource.
When fetching data using
I've get this error
Data relations looks as follow List - has_many -> Resources -belongs_to -> Party -has_many -> PartyMembers -belongs_to -> User
Expected behavior List of List resources with members data like:
** Runtime