Added tests and fix for lastInsertId() on camel case tables.

This commit is contained in:
Dmitry Khomutov 2018-03-01 17:18:59 +07:00
commit 9fc73577ca
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
3 changed files with 27 additions and 15 deletions

View file

@ -51,7 +51,7 @@ class Database extends \PDO
public function lastInsertIdExtended($table = null)
{
if ($table && self::POSTGRESQL_TYPE === $this->getAttribute(self::ATTR_DRIVER_NAME)) {
return parent::lastInsertId($table . '_id_seq');
return parent::lastInsertId('"' . $table . '_id_seq"');
}
return parent::lastInsertId();