I expected that there would be tenant in the context, but it’s not there.
expr(companies.id == ^context(:tenant)) # <-- tenant isn't in context
I expected that there would be tenant in the context, but it’s not there.
expr(companies.id == ^context(:tenant)) # <-- tenant isn't in context
I don’t think so currently. I think you will need to do it functionally, i.e
prepare fn query, _ ->
Ash.Query.filter(query, expr(...^query.tenant))
end
Is this on the to-do list, or will it not be implemented in the near future?
It is not currently on the roadmap, but if it turns out to be necessary then we could potentially add it.
Now we can do:
expr(companies.id == ^tenant())