In my Phoenix app I have this:
entities = [
%{
name: "name1",
data: "data1"
},
#....
]
Enum.each(entities, fn(x) ->
MyApp.Repo.insert!(MyApp.changeset(%MyApp.MyTable{}), x)
end)
And an error I get is this:
** (FunctionClauseError) no function clause matching in Ecto.Repo.Schema.insert/4
