[PR #7200] Failing test: loading cached collection breaks if EM is cleared/closed #10368

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

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

State: closed
Merged: No


Steps to reproduce:

  • have SLC and cached one-to-many collection
  • load the entity with 1:N association
  • close/clear EM (intentionally or due to error)
  • try to load items in the association
    => 💥

Without SLC, it works

The underlining cause is, that AbstractEntityPersister::loadOneToManyCollection tries to access entity identifiers in UoW:$entityIdentifiers - which is empty after em::clear.

Attached is failing test case.

**Original Pull Request:** https://github.com/doctrine/orm/pull/7200 **State:** closed **Merged:** No --- Steps to reproduce: - have SLC and cached one-to-many collection - load the entity with 1:N association - close/clear EM (intentionally or due to error) - try to load items in the association => 💥 **Without SLC, it works** The underlining cause is, that `AbstractEntityPersister::loadOneToManyCollection` tries to access entity identifiers in `UoW:$entityIdentifiers` - which is empty after `em::clear`. Attached is failing test case.
admin added the pull-request label 2026-01-22 16:07:18 +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#10368