DDC-1905: Calling EntityManager::flush($entity) calls OnFlushEvent for all entities #2402

Closed
opened 2026-01-22 13:51:49 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jul 3, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user pmk1c:

As the title says, calling EntityManager::flush($entity) calls OnFlushEvent for all entities. It should only call the event for the flushed entity.

Because of this problems occur when the OnFlush event is triggering itself. It should be possible to flush some entities in the OnFlush event without getting into an infinite loop.

Originally created by @doctrinebot on GitHub (Jul 3, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user pmk1c: As the title says, calling EntityManager::flush($entity) calls OnFlushEvent for all entities. It should only call the event for the flushed entity. Because of this problems occur when the OnFlush event is triggering itself. It should be possible to flush some entities in the OnFlush event without getting into an infinite loop.
admin added the Bug label 2026-01-22 13:51:49 +01:00
admin closed this issue 2026-01-22 13:51:49 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jul 4, 2012):

Comment created by @beberlei:

Not possible

@doctrinebot commented on GitHub (Jul 4, 2012): Comment created by @beberlei: Not possible
Author
Owner

@doctrinebot commented on GitHub (Jul 4, 2012):

Issue was closed with resolution "Won't Fix"

@doctrinebot commented on GitHub (Jul 4, 2012): Issue was closed with resolution "Won't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2402