-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
outstanding issues with dynamic refactor #81
Comments
update: Enums are still not fixed, however the query builder seems to be respecting the I'm also having issues with trying to load the aggregate through a relationship this is when I try to get the count of leased assets from asset type. i.e: On AssetType Asset |
@kernel-io is there a new error message for the storage_type issue? |
postgres saying the type doesn't exist (when it does) |
okay, so I have my custom types defined in each tenant's schema, the issue is that we aren't qualifying which schema the custom type is defined in, so postgres is looking for it in the db roles search_path, which doesn't contain that custom type. would it be easy to specify the schema the type is in? (i.e: |
I think the primary thing we could do here is to have a callback like |
Okay, the latest master has that fix, so you can add |
all sorted :) |
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 countI 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
.The text was updated successfully, but these errors were encountered: