backpex
backpex copied to clipboard
`maybe_join/2` should check if join was already added
Describe the bug
- a BelongsTo field joins the associated table automatically via
maybe_join
- the
item_query
is executed beforemaybe_join
- if the join was already added via the
item_query
, themaybe_join
should check whether the join is already exists or not
from(schema, as: ^name_by_schema(schema))
|> item_query.()
|> maybe_join(associations)
...