We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Jira issue originally created by user jirin:
I have entity:
class Article{ /**** * @ORM\OneToMany(targetEntity = "ArticleModule\Model\Entities\ArticlePhoto", mappedBy = "article", cascade = {"persist", "remove"}, orphanRemoval = TRUE) * @ORM\OrderBy({"sequence" = "ASC"}) */ protected $articlePhotos; }
And Entity Listener with preRemove.
I call
$article->articlePhotos->clear(); ...some changes with entity... $em->flush();
preRemove in Entity Listener is called, BUT before Begin transaction...
I can do $em->transactional(function(){}); then it's full in transaction..
The text was updated successfully, but these errors were encountered:
Comment created by @Ocramius:
As of https://github.com/doctrine/doctrine2/blob/ff801879304dfc2bdec34222d4c03fa7bde3e4e4/lib/Doctrine/ORM/UnitOfWork.php#L344, I see that preUpdate listeners are executed AFTER the transaction has been started.
preUpdate
Marking as invalid
Sorry, something went wrong.
Issue was closed with resolution "Invalid"
Ocramius
No branches or pull requests
Jira issue originally created by user jirin:
I have entity:
And Entity Listener with preRemove.
I call
preRemove in Entity Listener is called, BUT before Begin transaction...
I can do
$em->transactional(function(){}); then it's full in transaction..
The text was updated successfully, but these errors were encountered: