Merge pull request #148 from creative-commoners/pulls/3.0/better-get-generated-id-logic

BUG Use more robust logic to retrieve generated ID
This commit is contained in:
Guy Sartorelli 2023-06-30 09:37:26 +12:00 committed by GitHub
commit 4608fd7609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ class PostgreSQLConnector extends DBConnector
public function getGeneratedID($table)
{
return $this->query("SELECT currval('\"{$table}_ID_seq\"')")->value();
return $this->query("SELECT currval(pg_get_serial_sequence('\"{$table}\"','ID'))")->value();
}
public function getLastError()