Cannot find the right binding when sorting by fragment in many_to_many
it seems like this should be possible: https://hexdocs.pm/ash/expressions.html#many-to-many-relationships
The error:
(Ecto.SubQueryError) the following exception happened when compiling a subquery.\n\n (Ecto.QueryError) could not find named binding
parent_as(1)
in query"13 Replies
make sure to upgrade ash, ash_postgres and ash_sql fully
there was a bug sort of like this
checking
same problem on latest
funnily enough, this works:
oh, interesting
it may be something we fixed for filteirng but not for sorting 😢
Will need to fix
@rtorresware if you can also add a repro test to
ash_postgres
that would be great 🙂I’ll check the previous issue and see if I can fix
@Zach Daniel would this be the issue you had in mind? https://github.com/ash-project/ash_postgres/issues/287#issue-2299360409
GitHub
parent does not work from within an aggregate filter · Issue #287...
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: ...
nvm I don't think it is
It looks like the one I was thinking of yeah
but it may be unrelated 🤔
there is work that we do to get the paths that we need to join on the parent query for
and wherever that is we're probably missing it in the sort somehow
is this a good repro? a fork of the ash_postgres repo with added tests that fail. https://github.com/rtorresware/ash_postgres/commit/fe590d84d406b592064a2844b0b45e0a422d9ba6
GitHub
add a test for default sort referencing parent field in many_to_man...
…relationship with no_attributes? true
I tried to fix but it all goes over my head.
Yep!
Can you PR the failing test?
sure, on it
GitHub
add a test for default sort referencing parent field in many_to_man...
…relationship with no_attributes? true
Contributor checklist
Leave anything that you believe does not apply unchecked.
I accept the AI Policy, or AI was not used in the creation of this PR.
Bug ...
oops I made the test .ex and not .exs that's why it did not run. Here's the PR to fix: https://github.com/ash-project/ash_postgres/pull/609/files
GitHub
rename test file so it matches pattern by rtorresware · Pull Reque...
Contributor checklist
Leave anything that you believe does not apply unchecked.
I accept the AI Policy, or AI was not used in the creation of this PR.
Bug fixes include regression tests
Chores
...