How to bind field to a column with different name with Elixir Ecto -


i'm trying build small app that's going connect legacy db. there way define ecto model attribute names different table columns?

something like:

schema "oauth_access_tokens"   field :token   field :user_id, :integer, column: :resource_owner_id end 

unfortunately, don't think it's possible right now.

a possible solution use views on database level, i'm not sure if it's idea.


Comments