title: How move a save model outside a loop in Yii?
body: <p>I need to move outside a loop the <code>$model-&gt;save()</code> sentence, by example:</p>
  
  <pre><code>foreach ($nodes as $i =&gt; $node) { 
      $model = new Singer();
      $model-&gt;name = $node['name'];
      $model-&gt;birthDate = $node['birthDate'];
      $model-&gt;save();
  }
  </code></pre>
  
  <p>There is no way to save the model outside the loop? I mean if there is 100000 records in <code>$nodes</code> the save method will be executed 100000 times?? 
  Thank you!</p>