Why does this changeset not update correctly with Ecto?
<p>I'm following pretty much what pattern we see in a generated controller.  The changeset says it is valid but when I update the User model does not get updated.  The role remains nil.</p>

<pre><code>&gt; alias Faq.Repo
&gt; user = Repo.get!(User, 1)
&gt; changeset = User.changeset(user, %{role: 'admin'})
#Ecto.Changeset&lt;action: nil, changes: %{}, errors: [], data: #Faq.User&lt;&gt;,
valid?: true&gt;
&gt; Repo.update(changeset)
{:ok,
  %Faq.User{__meta__: #Ecto.Schema.Metadata&lt;:loaded, "users"&gt;,
  current_sign_in_at: #Ecto.DateTime&lt;2016-12-02 03:54:54&gt;,
  current_sign_in_ip: "{127, 0, 0, 1}", email: "gary.haran@gmail.com", id: 1,
  inserted_at: #Ecto.DateTime&lt;2016-12-01 04:18:48&gt;,
  last_sign_in_at: #Ecto.DateTime&lt;2016-12-01 04:55:51&gt;,
  last_sign_in_ip: "{127, 0, 0, 1}", name: "Gary Haran", password: nil,
  password_confirmation: nil,
  password_hash: "$2b$12$K603vGmolll/RtaXTrtcsusHbIsXi4IqB9yM9Ph65T3Cqlh/J5UbG",
  reset_password_sent_at: nil, reset_password_token: nil, 
  role: nil,
  sign_in_count: 5, 
  unlock_token: nil,
  updated_at: #Ecto.DateTime&lt;2016-12-02 03:54:54&gt;}}
</code></pre>

<p>What am I missing?</p>

<p>/edit Here is my changeset method:</p>

<pre><code>  def changeset(model, params \\ %{}) do
    model
    |&gt; cast(params, [:name, :email] ++ coherence_fields)
    |&gt; validate_required([:name, :email])
    |&gt; validate_format(:email, ~r/@/)
    |&gt; unique_constraint(:email)
    |&gt; validate_coherence(params)
  end
</code></pre>