When attempting to use parent from within an aggregates filter the following error is thrown
Unsupported expression in Elixir.AshPostgres.SqlImplementation query: %{attribute: :queue_id, resource: nil, __struct__: Ash.Query.Ref, relationship_path: [], bare?: nil, input?: nil, simple_equality?: nil}
The workaround is to place the parent within a filter defined on the relationship.
Expectation is that parent is available in all contexts.
count :open_count, :transactions do
filter expr(status != :completed and queue_id == parent(queue_id))
end
throws an error, a filter needs to be defined on the transactions relationship as such.
When attempting to use
parent
from within an aggregates filter the following error is thrownUnsupported expression in Elixir.AshPostgres.SqlImplementation query: %{attribute: :queue_id, resource: nil, __struct__: Ash.Query.Ref, relationship_path: [], bare?: nil, input?: nil, simple_equality?: nil}
The workaround is to place the
parent
within a filter defined on the relationship.Expectation is that
parent
is available in all contexts.throws an error, a filter needs to be defined on the
transactions
relationship as such.