fix: don't reuse binding in many to many aggregate joins

This commit is contained in:
Zach Daniel 2024-03-07 11:33:23 -05:00
parent 842f16a2fa
commit 3c2b8912d0

View file

@ -209,6 +209,9 @@ defmodule AshPostgres.Aggregate do
^first_relationship.source_attribute_on_join_resource
)
)
|> Map.update!(:__ash_bindings__, fn bindings ->
Map.update!(bindings, :current, &(&1 + 1))
end)
AshPostgres.Join.set_join_prefix(
subquery,