How do I insert multiple rows into table calling save()
method once in Doctrine?
Here another solution ,tested on Doctrine 1.2. No need to save each records, the flush() automatically finds out all the unsaved instances and saves them all.
$row = new \My_Doctrine_Record();
$row->name = 'aaa';
$row->approved = 1;
/// ...
$row = new \My_Doctrine_Record();
$row->name = 'val';
$row->approved = 'bbb';
Doctrine_Manager::connection()->flush();