Skip to content


DDC-3079: preUpdate in EntityListener not run in transaction #3852

doctrinebot opened this Issue · 2 comments

2 participants


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

...some changes with entity...

preRemove in Entity Listener is called, BUT before Begin transaction...

I can do
$em->transactional(function(){}); then it's full in transaction..


Comment created by @ocramius:

As of, I see that preUpdate listeners are executed AFTER the transaction has been started.

Marking as invalid


Issue was closed with resolution "Invalid"

@Ocramius Ocramius was assigned by doctrinebot
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.