Skip to content

Conversation

rtorresware
Copy link
Contributor

…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 fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

@zachdaniel zachdaniel merged commit ff3402e into ash-project:main Aug 31, 2025
58 of 63 checks passed
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

@zachdaniel
Copy link
Contributor

Was this supposed to fail? Its passing AFAICT.

@rtorresware
Copy link
Contributor Author

rtorresware commented Sep 1, 2025

yes this still fails for me on my local on latest origin/main, even after cleaning up deps and _build

rtorres@macbook-2 ~/r/c/ash_postgres (main)> git remote -v                                                                                                        nixpkgs#elixir
fork    git@github.com:rtorresware/ash_postgres_fork.git (fetch)
fork    git@github.com:rtorresware/ash_postgres_fork.git (push)
myfork  git@github.com:rtorresware/ash_postgres.git (fetch)
myfork  git@github.com:rtorresware/ash_postgres.git (push)
origin  git@github.com:ash-project/ash_postgres.git (fetch)
origin  git@github.com:ash-project/ash_postgres.git (push)
rtorres@macbook-2 ~/r/c/ash_postgres (main)> git diff origin/main                                                                                                 nixpkgs#elixir
rtorres@macbook-2 ~/r/c/ash_postgres (main)> git status                                                                                                           nixpkgs#elixir
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
rtorres@macbook-2 ~/r/c/ash_postgres (main)> mix test test/parent_sort_test.ex                                                                                    nixpkgs#elixir
Running ExUnit with seed: 157114, max_cases: 20

    warning: variable "user" is unused (if the variable is not meant to be used, prefix it with an underscore)
    │
 14 │     user =
    │     ~~~~
    │
    └─ test/parent_sort_test.ex:14:5: AshPostgres.Test.ParentSortTest."test can reference parent field when declaring default sort in has_many no_attributes? relationship"/1



  1) test can reference parent field when declaring default sort in has_many no_attributes? relationship (AshPostgres.Test.ParentSortTest)
     test/parent_sort_test.ex:8
     ** (Ash.Error.Unknown)
     Bread Crumbs:
       > Exception raised in: AshPostgres.Test.Post.read
       > Exception raised in: AshPostgres.Test.Post.read

     Unknown Error

     * ** (Ecto.SubQueryError) the following exception happened when compiling a subquery.

         ** (Ecto.QueryError) could not find named binding `parent_as(0)` in query:

         from p0 in subquery(from p0 in AshPostgres.Test.Post,
           as: 500,
           where: type(as(500).type, {:parameterized, {Ash.Type.Atom.EctoType, unsafe_to_atom?: false}}) ==
           type(^"sponsored", {:parameterized, {Ash.Type.Atom.EctoType, []}}),
           windows: [order: [
           order_by: [

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants