From 7ea97e69cae55eea63c508920da7733f34fc72fa Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Wed, 21 Jun 2017 06:44:58 +0300 Subject: [PATCH] #6167 #6168 - clarifying on the reasoning why `query` is used instead of `fetchColumn` (cherry picked from commit d2be4a2) --- lib/Doctrine/ORM/Id/SequenceGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Id/SequenceGenerator.php b/lib/Doctrine/ORM/Id/SequenceGenerator.php index 7db8e908354..9d8e9eb75aa 100644 --- a/lib/Doctrine/ORM/Id/SequenceGenerator.php +++ b/lib/Doctrine/ORM/Id/SequenceGenerator.php @@ -76,7 +76,7 @@ public function generate(EntityManager $em, $entity) $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; }