diff --git a/lib/Doctrine/ORM/Id/SequenceGenerator.php b/lib/Doctrine/ORM/Id/SequenceGenerator.php index a27edae90..18d238499 100644 --- a/lib/Doctrine/ORM/Id/SequenceGenerator.php +++ b/lib/Doctrine/ORM/Id/SequenceGenerator.php @@ -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; }