Search
Star
Feedback
Setup for Free
ยฉ 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
How to filter associations when preloading them? - Ash Framework
AF
Ash Framework
โข
3y ago
โข
3 replies
Terryble
How to filter associations when preloading them?
I could probably do this with
Ecto.Query
Ecto.Query
instead
, but I was wondering how I would do it with
Ash.Query
Ash.Query
The scenario
, I want to list out all of the
Post
Post
and I also want to preload the
Category
Category
association of each post
. I also want to filter the categories to only ones that contain a specific
category_id
category_id
.
Ash Framework
Join
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.
2,193
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
How to define a read method for preloading associations inside a resource?
AF
Ash Framework / support
4y ago
How to filter results when using keyset pagination?
AF
Ash Framework / support
4y ago
destroy unmatching related associations
AF
Ash Framework / support
6mo ago
select fields from nested associations
AF
Ash Framework / support
10mo ago