We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi @crbelaus
I'm currently evaluating different solutions to tackle I18n in our project. trans looks very promising. Thank you for it!
trans
Using Trans.QueryBuilder in conjunction with join does not seem to work.
Trans.QueryBuilder
join
from(o in Organisation, join: p in assoc(o, :programs), select: %{title: translated_as(Program, p.title, user.locale)}) |> Repo.all()
results in the following error:
** (Postgrex.Error) ERROR 42703 (undefined_column) column "p0" does not exist query: SELECT translate_field(p0, $1::varchar, $2::varchar, $3::varchar, $4::varchar[]) AS "title" FROM "organisations" AS o0 INNER JOIN "programs" AS p1 ON p1."organisation_id" = o0."id"
Renaming the intermediate veriable p to p1 seems to resolve this issue.
p
p1
from(o in Organisation, join: p1 in assoc(o, :programs), select: %{title: translated_as(Program, p1.title, user.locale)} ) |> Repo.all()
This in turn does not seem to be a maintainable solution. Any thoughts on this?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi @crbelaus
I'm currently evaluating different solutions to tackle I18n in our project.
trans
looks very promising. Thank you for it!Using
Trans.QueryBuilder
in conjunction withjoin
does not seem to work.results in the following error:
Renaming the intermediate veriable
p
top1
seems to resolve this issue.This in turn does not seem to be a maintainable solution. Any thoughts on this?
The text was updated successfully, but these errors were encountered: