[PR #1139] [3.0] Single entity flush #9198

Open
opened 2026-01-22 16:03:33 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1139

State: closed
Merged: No


The current flush behavior seems to be inconsistent or not well documented.

If i have understood the documentation in the correct way, flush($entity) should flush the passed entity (and its related associations/entities), and leave untouched the remaining object graph.

The current behavior seems to be: flush all new objects, flush all $entity "updates", clear all "todo" stored into current UnitOfWork state.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1139 **State:** closed **Merged:** No --- The current `flush` behavior seems to be inconsistent or not well documented. If i have understood the documentation in the correct way, `flush($entity)` should flush the passed entity (and its related associations/entities), and leave untouched the remaining object graph. The current behavior seems to be: flush all new objects, flush all `$entity` "updates", clear all "todo" stored into current UnitOfWork state.
admin added the pull-request label 2026-01-22 16:03:33 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9198