ZF-3546: Zend_Db_Adapter_Pdo_Oci lastInsertId
Description
Oracle DB doesn't support auto increment, so the lastInsertId doesn't work.
I suggest this change, because Zend_Db_Table also uses lastInsertId() and when it throws an exception, that Oracle doesn't support it, it breaks an application.
It is already written in the comment to this method: {quote}Oracle does not support IDENTITY columns, so if the sequence is not specified, this method returns null.{quote}
Index: I:/xampp/php/PEAR/Zend15/library/Zend/Db/Adapter/Pdo/Oci.php
===================================================================
--- I:/xampp/php/PEAR/Zend15/library/Zend/Db/Adapter/Pdo/Oci.php (revision 9855)
+++ I:/xampp/php/PEAR/Zend15/library/Zend/Db/Adapter/Pdo/Oci.php (working copy)
@@ -292,7 +292,7 @@
$sequenceName .= $this->foldCase('_seq');
return $this->lastSequenceId($sequenceName);
}
- return $this->_connection->lastInsertId($tableName);
+ return;
}
/**
Comments
Posted by Martin Hujer (mhujer) on 2008-07-24T12:05:54.000+0000
it also affects 1.6.0RC1
Posted by Martin Hujer (mhujer) on 2008-08-12T23:46:06.000+0000
It also affects 1.6.0RC2
Posted by Martin Hujer (mhujer) on 2008-08-29T12:27:31.000+0000
It also affects 1.6.0RC3
Posted by Martin Hujer (mhujer) on 2008-09-07T02:01:37.000+0000
It also affects 1.6.0.
Posted by Martin Hujer (mhujer) on 2008-10-13T12:40:58.000+0000
It also affects 1.6.1.
Posted by Mickael Perraud (mikaelkael) on 2008-10-13T13:25:34.000+0000
Fixed in SVN11942
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:18.000+0000
Changing issues in preparation for the 1.7.0 release.