How to access property of a join resource in filter?
I have 2 resources in a many to many relationship through a 3rd join resource. However, this join resource has an additional boolean column. So now when I'm doing a
filter, how do I select only those related resources whose boolean is true or false in the join_through resource?Solution:Jump to solution
Nvm figured it out. Apparently this was exactly what the
parent() expression is for https://hexdocs.pm/ash/expressions.html#many-to-many-relationships. I didn't know I had to give a custom name to my join_relationship or otherwise use the default _join_assoc name when accessing this field1 Reply
Solution
Nvm figured it out. Apparently this was exactly what the
parent() expression is for https://hexdocs.pm/ash/expressions.html#many-to-many-relationships. I didn't know I had to give a custom name to my join_relationship or otherwise use the default _join_assoc name when accessing this field