diff --git a/cake/libs/model/datasources/dbo/dbo_postgres.php b/cake/libs/model/datasources/dbo/dbo_postgres.php index b6885569a..1580b2932 100644 --- a/cake/libs/model/datasources/dbo/dbo_postgres.php +++ b/cake/libs/model/datasources/dbo/dbo_postgres.php @@ -294,8 +294,7 @@ class DboPostgres extends DboSource { */ function lastInsertId($source, $field = 'id') { $seq = $this->getSequence($source, $field); - $data = $this->fetchRow("SELECT currval('{$seq}') as max"); - return $data[0]['max']; + return $this->_connection->lastInsertId($seq); } /**