fix: aggregate with parent ref in relationship filter and sorting on relationship field#197
Conversation
…relationship field A test covering this fix has been created in ash_postgres
|
@ahey is this a consequence from your other change? Extracting parent refs is not something that are on the table nor should we have to do it. Is there a specific bug you're looking to fix? |
|
@zachdaniel this is unrelated to the other change. Here is the test that reproduces the issue: ash-project/ash_postgres#658 |
|
Got it. I'll have to look into this further this week or this weekend because I don't think we can extract refs like this in general, there are too many edge cases. We would instead likely need to do something when adding the aggregates themselves where the filter ends up being fully hydrated to track what parent attributes are referenced to ensure they are selected for example. |
|
Thanks @zachdaniel for your help and the update. |
|
Actually, I think this covers enough and does actually solve the issue, there might just be some additional work downstream to expand certain kinds of references. This also helped me fix another issue also. Thanks! |
|
You're most welcome, and thank you for your help on this! All tests are passing on my ash projects 😄 |
Contributor checklist
Leave anything that you believe does not apply unchecked.