title: (RuntimeError) casting assocs with cast/4 is not supported, use cast_assoc/3 instead
body: <p>I don't understand this error and I searched a lot. Non of the examples are showing multiple association?
  Here are the codes.</p>
  
  <p>My AccessList:</p>
  
  <pre><code>defmodule Db.AccessList do
      use Ecto.Schema
  
      schema "access_lists" do
          belongs_to :user_id, Db.User
          belongs_to :role_id, Db.Role
          belongs_to :asset_id, Db.Asset
          belongs_to :project_id, Db.Project
  
          timestamps()
      end
  
      def changeset(model, params \\ %{}) do
              model
              |&gt; Ecto.Changeset.cast(params, [:user_id, :role_id, :asset_id, :project_id])
              |&gt; Ecto.Changeset.validate_required([:user_id, :role_id])
      end
  end
  </code></pre>
  
  <p>test:</p>
  
  <pre><code>defmodule AccessListTest do
      alias Db.{ AccessList }
      use ExUnit.Case
  
      @valid_attr %{user_id: 1, role_id: 1, asset_id: 1, project_id: 1 }
  
      @tag :wip
      test "ACCESSLIST.1 valid attribute" do
          changeset = AccessList.changeset(%AccessList{}, @valid_attr)
          assert changeset.valid?
      end
  
      @tag :wip
      test "ACCESSLIST.2 invalid attribute" do
          invalid_attr = Map.put(@valid_attr, :user_id, nil)
          changeset = AccessList.changeset(
              %AccessList{}, invalid_attr
          )
          refute changeset.valid?
      end
  end
  </code></pre>
  
  <p>Here is the error:</p>
  
  <pre><code>......
  
    1) test ACCESSLIST.1 valid attribute (AccessListTest)
       test/access_list_test.exs:8
       ** (RuntimeError) casting assocs with cast/4 is not supported, use cast_assoc/3 instead
       code: changeset = AccessList.changeset(%AccessList{}, @valid_attr)
       stacktrace:
         (ecto) lib/ecto/changeset.ex:485: Ecto.Changeset.type!/2
         (ecto) lib/ecto/changeset.ex:464: Ecto.Changeset.process_param/7
         (elixir) lib/enum.ex:1826: Enum."-reduce/3-lists^foldl/2-0-"/3
         (ecto) lib/ecto/changeset.ex:449: Ecto.Changeset.cast/6
         (db) lib/db/access_list.ex:15: Db.AccessList.changeset/2
         test/access_list_test.exs:10: (test)
  
  
  
    2) test ACCESSLIST.2 invalid attribute (AccessListTest)
       test/access_list_test.exs:15
       ** (RuntimeError) casting assocs with cast/4 is not supported, use cast_assoc/3 instead
       code: changeset = AccessList.changeset(
       stacktrace:
         (ecto) lib/ecto/changeset.ex:485: Ecto.Changeset.type!/2
         (ecto) lib/ecto/changeset.ex:464: Ecto.Changeset.process_param/7
         (elixir) lib/enum.ex:1826: Enum."-reduce/3-lists^foldl/2-0-"/3
         (ecto) lib/ecto/changeset.ex:449: Ecto.Changeset.cast/6
         (db) lib/db/access_list.ex:15: Db.AccessList.changeset/2
         test/access_list_test.exs:18: (test)
  
  
  
  Finished in 0.3 seconds
  53 tests, 2 failures, 45 skipped
  </code></pre>