mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2871: preFlush event called multiple times in event manager. #3582
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Dec 25, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user strate:
preFlush event called multiple times inside event manager when flushing more than one entity.
@doctrinebot commented on GitHub (Dec 25, 2013):
@doctrinebot commented on GitHub (Dec 25, 2013):
Comment created by @beberlei:
preFlush is called for every entity, you can retrieve the entity affected by using "getEntity()" on the event arguments. Use "onFlush" to get an evvent that is only called once.
@doctrinebot commented on GitHub (Dec 25, 2013):
Comment created by strate:
Benjamin,
@doctrinebot commented on GitHub (Dec 25, 2013):
Comment created by @beberlei:
Ok, the problem is as it seems, there is a "preFlush" lifecycle event that is called for every entity, but also a preFlush listener event that isonly called once. I didn't know that there were sementical differences between them. This indeed needs to be fixed.
@doctrinebot commented on GitHub (Dec 25, 2013):
Comment created by strate:
Fix provided here: https://github.com/doctrine/doctrine2/pull/887
@doctrinebot commented on GitHub (Jan 2, 2014):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-887] was closed:
https://github.com/doctrine/doctrine2/pull/887
@doctrinebot commented on GitHub (Jan 2, 2014):
Issue was closed with resolution "Duplicate"
@doctrinebot commented on GitHub (Jan 2, 2014):
Comment created by @beberlei:
see DDC-2692