1
0
mirror of synced 2025-01-18 06:21:40 +03:00
This commit is contained in:
zYne 2007-07-05 22:42:32 +00:00
parent 378ed91ab6
commit ec39adcd73
2 changed files with 4 additions and 4 deletions

View File

@ -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)';
}

View File

@ -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()