Hi all,
I am in a bit of a pickle, when I use Ecto.Multi.insert()
and Ecto.Multi.run()
, I am to pipe down to the transaction and case the result as shown below;
|> Repo.transaction()
|> case do
{:ok, %{user: user, user_log: _user_log}}
However, when I use Ecto.Multi.insert_all()
, I get the below exampled:
|> Repo.transaction()
|> case do
{:ok, %{user: user, user_log: {2,nil} }}
Question: Is there a way of returning a list of structs of the inserted values rather the the tuple {2, nil}