1
0
mirror of synced 2025-03-06 21:06:16 +03:00

Fixes #6167 - nextval issue on master-slave PostgreSQL setup

This commit is contained in:
Michał Kurzeja 2016-12-09 21:48:43 +01:00 committed by Marco Pivetta
parent 1e3bf6562e
commit 60b6073643
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629

View File

@ -76,7 +76,7 @@ class SequenceGenerator extends AbstractIdGenerator implements Serializable
$conn = $em->getConnection();
$sql = $conn->getDatabasePlatform()->getSequenceNextValSQL($this->_sequenceName);
$this->_nextValue = (int) $conn->fetchColumn($sql);
$this->_nextValue = (int) $conn->query($sql)->fetchColumn(0);
$this->_maxValue = $this->_nextValue + $this->_allocationSize;
}