Skip to content

poc: extend exists/2 to traverse embedded array attributes#2705

Draft
nallwhy wants to merge 7 commits into
ash-project:mainfrom
nallwhy:feat/embedded-array-exists
Draft

poc: extend exists/2 to traverse embedded array attributes#2705
nallwhy wants to merge 7 commits into
ash-project:mainfrom
nallwhy:feat/embedded-array-exists

Conversation

@nallwhy
Copy link
Copy Markdown
Contributor

@nallwhy nallwhy commented May 17, 2026

poc of #2698

Copilot AI review requested due to automatic review settings May 17, 2026 12:31
@nallwhy nallwhy marked this pull request as draft May 17, 2026 12:31
@zachdaniel
Copy link
Copy Markdown
Contributor

Looking at the Ash PR it generally looks good! Haven't looked too deeply at the others. However, one thing I'd like to see is a test proving that the relationship path referencing works with this. There are example tests in the policy tests that exercise these over exists etc.

@nallwhy
Copy link
Copy Markdown
Contributor Author

nallwhy commented May 19, 2026

Good call — added a test covering exactly that pattern, mirroring parent_test.exs:164 (where parent/1 traverses a belongs_to relationship into a related row's attribute) but with an embedded-array target on the outside:

exists(options, name == parent(company.name))

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