doctrine/doctrine2 — pull request #942 by Ocramius (2014-02-09 00:45:18+00:00)
Title: DDC-2965 - Changing ID generation after `flush` makes persisters unusable

As posted on http://www.doctrine-project.org/jira/browse/DDC-2965 by @psliwa (imported his tests)