Skip to content

Commit

Permalink
Fixes #6167 - nextval issue on master-slave PostgreSQL setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurzeja authored and Ocramius committed Jun 21, 2017
1 parent 1e3bf65 commit 60b6073
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Id/SequenceGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function generate(EntityManager $em, $entity)
$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;
}

Expand Down

0 comments on commit 60b6073

Please sign in to comment.