yiisoft/yii2 — pull request #2070 by creocoder (2014-01-20 11:32:53+00:00)
Title: [WIP] ActiveRecord::saveMultiple() and corresponding methods needed for batch inserts/updates for AR

Example:

```php
$customer1 = new Customer;
$customer1->name = $name1;
$customer1->email = $email1;
$customer2 = new Customer;
$customer2->name = $name2;
$customer2->email = $email2;
$customer3 = new Customer;
$customer3->name = $name3;
$customer3->email = $email3;
ActiveRecord::saveMultiple([$customer1, $customer2, $customer3]);
```

Will be performed in **one** query, instead of **three** queries. Name for this method was choosen to be consistent with `Model::loadMultiple()` and `Model::validateMultiple()` methods. More details and examples for other methods which implemented for `ActiveRecord::saveMultiple()` needs will be given later.

Why this implemented? We have batch save feature at DAO level and this is not use its potential inside Active Record. In 2014 Active Record without batch save/batch update feature lead to lost fw popularity and unjustified expenditure of server resources and electricity. So this feature is must have in AR.

Work for this in progress.