Optimize Multi with Changesets
Learn how to optimize Multi with changesets.
We'll cover the following...
We'll cover the following...
One important consideration with Multi is that the transaction call works with unhandled errors the same way it does with functions in that they’re bubbled up to the transaction function.
Consider this example:
alias Ecto.Multimulti =Multi.new\|> Multi.insert(:artist, %Artist{})Repo.transaction(multi)
 ...