Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing a couple failing tests on windows using sqlserver

  • Loading branch information...
commit cd562f52bad9aca436335dfa0b5b26dab954c7f4 1 parent 9a7e69d
@lorenzo lorenzo authored
Showing with 1 addition and 11 deletions.
  1. +1 −11 lib/Cake/Model/Datasource/Database/Sqlserver.php
View
12 lib/Cake/Model/Datasource/Database/Sqlserver.php
@@ -645,14 +645,7 @@ public function insertMulti($table, $fields, $values) {
$this->_execute('SET IDENTITY_INSERT ' . $this->fullTableName($table) . ' ON');
}
- $table = $this->fullTableName($table);
- $fields = implode(', ', array_map(array(&$this, 'name'), $fields));
- $this->begin();
- foreach ($values as $value) {
- $holder = implode(', ', array_map(array(&$this, 'value'), $value));
- $this->_execute("INSERT INTO {$table} ({$fields}) VALUES ({$holder})");
- }
- $this->commit();
+ parent::insertMulti($table, $fields, $values);
if ($hasPrimaryKey) {
$this->_execute('SET IDENTITY_INSERT ' . $this->fullTableName($table) . ' OFF');
@@ -717,9 +710,6 @@ public function buildIndex($indexes, $table = null) {
* @return string
*/
protected function _getPrimaryKey($model) {
- if (!is_object($model)) {
- $model = new Model(false, $model);
- }
$schema = $this->describe($model);
foreach ($schema as $field => $props) {
if (isset($props['key']) && $props['key'] == 'primary') {
Please sign in to comment.
Something went wrong with that request. Please try again.