3 ms·
Note that ecto now has a :source option on schema fields which allows you to map a third party db into your own field naming scheme. Very useful.
by raarts 9y ago
Note that ecto now has a :source option on schema fields which allows you to map a third party db into your own field naming scheme. Very useful.
- tonyarkles 9y agoOoooooooooooh! That's killer! I was quite annoyed by the ugly legacy table's column names polluting the new codebase. I'm looking around for this and I'm not sure that I've found the right information here. Does this apply on a per-field basis?
- raarts 9y agoIt has not been merged yet, but several people are using it in production. Here's the PR: https://github.com/elixir-ecto/ecto/pull/1998 https://github.com/elixir-ecto/ecto/pull/1998