Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using dbo methods to manage the transaction.

  • Loading branch information...
commit f0db55de6f72cb5675f6030f0744c2664ce6a5b6 1 parent 82e2d9e
@jrbasso jrbasso authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Model/Datasource/Database/Mssql.php
View
4 lib/Cake/Model/Datasource/Database/Mssql.php
@@ -619,12 +619,12 @@ public function insertMulti($table, $fields, $values) {
$table = $this->fullTableName($table);
$fields = implode(', ', array_map(array(&$this, 'name'), $fields));
- $this->_connection->beginTransaction();
+ $this->begin();
foreach ($values as $value) {
$holder = implode(', ', array_map(array(&$this, 'value'), $value));
$this->_execute("INSERT INTO {$table} ({$fields}) VALUES ({$holder})");
}
- $this->_connection->commit();
+ $this->commit();
if ($hasPrimaryKey) {
$this->_execute('SET IDENTITY_INSERT ' . $this->fullTableName($table) . ' OFF');
Please sign in to comment.
Something went wrong with that request. Please try again.