1
0
mirror of synced 2025-02-09 00:39:25 +03:00

#6167 #6168 - clarifying on the reasoning why query is used instead of fetchColumn

This commit is contained in:
Marco Pivetta 2017-06-21 05:44:58 +02:00
parent 571115cf18
commit d2be4a2b48
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);
// Use query to force master in MasterSlaveConnection
// Using `query` to force usage of the master server in MasterSlaveConnection
$this->_nextValue = (int) $conn->query($sql)->fetchColumn();
$this->_maxValue = $this->_nextValue + $this->_allocationSize;
}