MyApp.Repo.insert!(MyApp.chang."/> MyApp.Repo.insert!(MyApp.chang."/> MyApp.Repo.insert!(MyApp.chang"/>
خرید بک لینک

Vote count: 0

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

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 29 خرداد 1395 ساعت: 23:22

صفحه بندی