不要怂,就是干,撸起袖子干!

chain-queries.ejs 526 Bytes
Because you will want to save several items at once and just go on after all of them are saved, Sequelize provides a handy helper for that:

<pre><%- koala(".js", partial("code/chain-queries/chain-queries-1.ejs")) %></pre>

And a real example:

<pre><%- koala(".js", partial("code/chain-queries/chain-queries-2.ejs")) %></pre>

You can also pass params to the method... and of course you can also call other methods, which trigger a callback:

<pre><%- koala(".js", partial("code/chain-queries/chain-queries-3.ejs")) %></pre>