Description
As discussed on Discord here are the outstanding issues I am encountering in my application while using the dynamic refactor of ash postgres.
-
Inability to use DB enums as Ash explicitly casts the bindings to a varchar instead of just leaving it uncast - i.e:
SELECT * FROM burgers WHERE status = $1::varchar
(instead of just= $1
) - also thestorage_type
override on Ash.Type has no effect on this. -
Ash gets confused while trying to load an aggregate that has a filter on it
count :total_leased_count, :assets, filter: expr(is_nil(active_order_service.id) == false)
In my case I have AssetType which has many Assets, which in turn has one active OrderService (has_one :active_order_service, OrderService, filter: expr(fragment("? @> now()", period))
), I have a count aggregate defined on AssetType which counts the number of Assets with an active OrderService, OrderService has a range type column called period.
error is unknown error: {%Ecto.SubQueryError{exception: %Ecto.QueryError{message: \"could not find named binding 'as(nil)')
while trying to load the AssetType with the count
-
I have previously needed to define the filter on the aggregate and relationship for it to work correctly, I can't tell if this has been fixed as point 2 is blowing up first.
-
There was an issue with GROUP BY on aggregates, which I think has been resolved, but I can't fully test because of
2
.