From ec39adcd734fb8ceb727797611fcc0ac4d84c053 Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 5 Jul 2007 22:42:32 +0000 Subject: [PATCH] --- lib/Doctrine/Sequence/Mssql.php | 2 +- tests/Sequence/MssqlTestCase.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/Sequence/Mssql.php b/lib/Doctrine/Sequence/Mssql.php index 5f9a60051..ad0a1d7cb 100644 --- a/lib/Doctrine/Sequence/Mssql.php +++ b/lib/Doctrine/Sequence/Mssql.php @@ -48,7 +48,7 @@ class Doctrine_Sequence_Mssql extends Doctrine_Sequence if ($this->checkSequence($sequenceName)) { $query = 'SET IDENTITY_INSERT ' . $sequenceName . ' OFF ' - . 'INSERT INTO ' . $sequenceName . 'DEFAULT VALUES'; + . 'INSERT INTO ' . $sequenceName . ' DEFAULT VALUES'; } else { $query = 'INSERT INTO ' . $sequenceName . ' (' . $seqcolName . ') VALUES (0)'; } diff --git a/tests/Sequence/MssqlTestCase.php b/tests/Sequence/MssqlTestCase.php index 7e05b7f05..bb48e10a1 100644 --- a/tests/Sequence/MssqlTestCase.php +++ b/tests/Sequence/MssqlTestCase.php @@ -40,7 +40,7 @@ class Doctrine_Sequence_Mssql_TestCase extends Doctrine_UnitTestCase $this->assertEqual($this->adapter->pop(), 'SELECT @@IDENTITY'); $this->assertEqual($this->adapter->pop(), 'SELECT @@VERSION'); - $this->assertEqual($this->adapter->pop(), 'SET IDENTITY_INSERT user_seq ON INSERT INTO user_seq (id) VALUES (0)'); + $this->assertEqual($this->adapter->pop(), 'SET IDENTITY_INSERT user_seq ON INSERT INTO user_seq (id) DEFAULT VALUES'); $this->assertEqual($this->adapter->pop(), 'SELECT COUNT(1) FROM user_seq'); } public function testNextIdExecutesSql() @@ -50,8 +50,8 @@ class Doctrine_Sequence_Mssql_TestCase extends Doctrine_UnitTestCase $this->assertEqual($this->adapter->pop(), 'DELETE FROM user_seq WHERE id < 0'); $this->assertEqual($this->adapter->pop(), 'SELECT @@IDENTITY'); - $this->assertEqual($this->adapter->pop(), 'SELECT @@VERSION'); - $this->assertEqual($this->adapter->pop(), 'SET IDENTITY_INSERT user_seq ON INSERT INTO user_seq (id) VALUES (0)'); + $this->assertEqual($this->adapter->pop(), 'SELECT @@VERSION'); + $this->assertEqual($this->adapter->pop(), 'SET IDENTITY_INSERT user_seq ON INSERT INTO user_seq (id) DEFAULT VALUES'); $this->assertEqual($this->adapter->pop(), 'SELECT COUNT(1) FROM user_seq'); } public function testLastInsertIdCallsPdoLevelEquivalent()