fix: don't use hard-coded join assoc name (#118)

This commit is contained in:
Zach Daniel 2022-11-13 11:38:00 -05:00 committed by GitHub
parent 961137c1d9
commit 63d007131f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -494,9 +494,7 @@ defmodule AshPostgres.Join do
Ash.Resource.Info.relationship(relationship.source, relationship.join_relationship)
join_path =
Enum.reverse([
String.to_existing_atom(to_string(relationship.name) <> "_join_assoc") | path
])
Enum.reverse([join_relationship.name | path])
full_path = path ++ [relationship.name]