mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing a couple failing tests on windows using sqlserver
This commit is contained in:
parent
9a7e69df7f
commit
cd562f52ba
1 changed files with 1 additions and 11 deletions
|
@ -645,14 +645,7 @@ class Sqlserver extends DboSource {
|
|||
$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 @@ class Sqlserver extends DboSource {
|
|||
* @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') {
|
||||
|
|
Loading…
Add table
Reference in a new issue