Skip to content

Instantly share code, notes, and snippets.

@aleandros
Created March 22, 2017 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aleandros/05bb96e6ab16c403d2796de7f859b5e8 to your computer and use it in GitHub Desktop.
Save aleandros/05bb96e6ab16c403d2796de7f859b5e8 to your computer and use it in GitHub Desktop.
Ecto model access field with uppercase
[bank|_] = Repo.all(Bank)
bank.'BankId' # That's it. That's all it takes and it works
# Same for database queries
query = from b in Bank,
where: b.'BankName' == "Bank Inc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment