UUID and problem with loading related models

If you removed that line from your schema, then it is going to expect integers. You have three options:

  1. Use :integer keys and then pass integer values
  2. Use :binary_id and pass binary values
  3. Use Ecto.UUID and pass actual UUIDs

It seems you want 3.