DDC-2595: UoW is not supposed to trigger the post-load event for uninitialized proxies. #3258

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

Originally created by @doctrinebot on GitHub (Aug 6, 2013).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user shiroyuki:

When one entity have multiple nested levels and associated to 700 other entities, the ORM exhausts a large amount of memory and execution time which exceeds either the memory limit or the maximum execution time.

Prerequisite:

  1. generate an entity, named "Mr. G", with 4 nested levels of association.
  2. ensure that the generated entity associating to 700 entities.
  3. create a post-load event listener which may or may not be restricted to uninitialized proxies.

How to Reproduce:

  1. have a code to load the "Mr. G" entity.
    X. (Done)

Notes:
The initial investigation indicates that UnitOfWork should not trigger the post-load event for uninitialized proxies.

One thing worth-mentioning is that if the event listener ignores all proxies, we will not have this problem. However, some properties (e.g., ones of type TEXT/BLOB) are not loaded into normal entities but they are loaded into the proxies.

Originally created by @doctrinebot on GitHub (Aug 6, 2013). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user shiroyuki: When one entity have multiple nested levels and associated to 700<ins> other entities, the ORM exhausts a large amount of memory and execution time which exceeds either the memory limit or the maximum execution time. Prerequisite: 1. generate an entity, named "Mr. G", with 4 nested levels of association. 2. ensure that the generated entity associating to 700</ins> entities. 3. create a post-load event listener which may or may not be restricted to uninitialized proxies. How to Reproduce: 1. have a code to load the "Mr. G" entity. X. (Done) Notes: The initial investigation indicates that UnitOfWork should not trigger the post-load event for uninitialized proxies. One thing worth-mentioning is that if the event listener ignores all proxies, we will not have this problem. However, some properties (e.g., ones of type TEXT/BLOB) are not loaded into normal entities but they are loaded into the proxies.
admin added the Bug label 2026-01-22 14:16:50 +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#3258