You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2018. It is now read-only.
When one calls lastInsertId() without any parameters inside a transaction that has not yet been committed, an incorrect value is returned.
To reproduce:
$this->getAdapter()->beginTransaction();
$this->insert(); // We assume that the table has a primary key named 'id' that is automatically incremented.
var_dump($this->getAdapter()->lastInsertId()); // Returns false
If one calls lastInsertId() with both parameters, then the correct value is returned. I.E.
var_dump($this->getAdapter()->lastInsertId($this->_name, 'id')); // Prints a number, like 23, which is what we would expect.
I tested this using Postgres, but it could be an issue in other adapters, as well.
The text was updated successfully, but these errors were encountered:
Jira Information
Description
When one calls lastInsertId() without any parameters inside a transaction that has not yet been committed, an incorrect value is returned.
To reproduce:
If one calls lastInsertId() with both parameters, then the correct value is returned. I.E.
I tested this using Postgres, but it could be an issue in other adapters, as well.
The text was updated successfully, but these errors were encountered: