How to filter associations when preloading them?
I could probably do this with
Ecto.Query
instead, but I was wondering how I would do it with Ash.Query
The scenario, I want to list out all of the Post
and I also want to preload the Category
association of each post. I also want to filter the categories to only ones that contain a specific category_id
.2 Replies
You can provide a query that will be used when fetching a relationship
That worked! Thanks!