Is there any way, I can insert multiple associative array in database table with doctrine's native sql query execution support? Currently, I can see to insert only a single row/associative array. code:
$connection = $em->getConnection();
$connection->insert('un_table_name', $associative_data_array);
My goal is to insert mutiple row in single statement so that they are inserted in single transaction.
Just to clarify, I am working on a migration task where data will be processed and transffered from old schema to new schema. but as entities are in only new schema structure, I can connect both db with ORM style. This is why I am following the native query support. also as bulk data will be transferred, I think multiple insert in single transaction will make the process faster.
Any suggestions/solutions are appreciated. Thanks.