mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Fixes #6167 - nextval issue on master-slave PostgreSQL setup
This commit is contained in:
committed by
Marco Pivetta
parent
1e3bf6562e
commit
60b6073643
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user