Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDC-2965 - Changing ID generation after flush makes persisters unusable #942

Closed
wants to merge 2 commits into from

Conversation

Ocramius
Copy link
Member

@Ocramius Ocramius commented Feb 9, 2014

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

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-2966

We use Jira to track the state of pull requests and the versions they got
included in.

@@ -2383,7 +2383,8 @@ public function clear($entityName = null)
$this->extraUpdates =
$this->readOnlyObjects =
$this->visitedCollections =
$this->orphanRemovals = array();
$this->orphanRemovals =
$this->persisters = array();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@psliwa can you look into this? Basically, my idea is that changing metadata after initialization can lead to very unexpected results, and therefore requires either a new EntityManager instance or clearing it.

@beberlei
Copy link
Member

beberlei commented Feb 9, 2014

It is not officially supported to change the metadata after usage. These objects are frozen after loadClassMetadata and should stay this way, otherwise we are doomed internally to think about Metadata changing state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants