Flushing one entity flushes also changes done in not related PersistentCollection #5786

Open
opened 2026-01-22 15:17:53 +01:00 by admin · 0 comments
Owner

Originally created by @simara-svatopluk on GitHub (Nov 29, 2017).

Originally assigned to: @Ocramius on GitHub.

Scenario:

  • Let's assume a couple of entities with collections in a database
  • Select two and clean their collections
  • Flush only one entity
  • The other entity collection is also flushed - bug

The problem is that PersistentCollection manipulate directly UnitOfWork and changes are flushed even if some another entity is flushed.

Test: 200f659d68
Important is line 40; fails on 49

Originally created by @simara-svatopluk on GitHub (Nov 29, 2017). Originally assigned to: @Ocramius on GitHub. Scenario: * Let's assume a couple of entities with collections in a database * Select two and clean their collections * Flush only one entity * The other entity collection is also flushed - bug The problem is that PersistentCollection manipulate directly UnitOfWork and changes are flushed even if some another entity is flushed. Test: https://github.com/simara-svatopluk/doctrine2/commit/200f659d68ad9b8bfb6eee7e048fffe8e909e42c Important is line 40; fails on 49
admin added the BugInvalidQuestion labels 2026-01-22 15:17:53 +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#5786