DDC-2231: [GH-546] The EntityManager was not injected in uninitialized proxys which are Obj... #2808

Closed
opened 2026-01-22 14:04:21 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 10, 2013).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of stefankleff:

Url: https://github.com/doctrine/doctrine2/pull/546

Message:

...ectManagerAware.

I ran into that problem while I had two objects in the identitymap while hydrating a collection: one was new a "real" entity and the other one was an uninitialized proxy. For "real" entities the em is injected in line 2427, for new entities it is injected in 2436->2364, but for proxies this is missing. According to the comment "inject ObjectManager into just loaded proxies." the code in line 2427 should do this, but in fact it is just used if it is a "real" entity or an already initialized proxy. Moving the injection to outside of the condition in line 2411 (if the entity is an unitialized proxy) solves this.

Originally created by @doctrinebot on GitHub (Jan 10, 2013). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: This issue is created automatically through a Github pull request on behalf of stefankleff: Url: https://github.com/doctrine/doctrine2/pull/546 Message: ...ectManagerAware. I ran into that problem while I had two objects in the identitymap while hydrating a collection: one was new a "real" entity and the other one was an uninitialized proxy. For "real" entities the em is injected in line 2427, for new entities it is injected in 2436->2364, but for proxies this is missing. According to the comment "inject ObjectManager into just loaded proxies." the code in line 2427 should do this, but in fact it is just used if it is a "real" entity or an already initialized proxy. Moving the injection to outside of the condition in line 2411 (if the entity is an unitialized proxy) solves this.
admin added the Bug label 2026-01-22 14:04:21 +01:00
admin closed this issue 2026-01-22 14:04:21 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 12, 2013):

Comment created by @beberlei:

A related Github Pull-Request [GH-546] was closed
https://github.com/doctrine/doctrine2/pull/546

@doctrinebot commented on GitHub (Jan 12, 2013): Comment created by @beberlei: A related Github Pull-Request [GH-546] was closed https://github.com/doctrine/doctrine2/pull/546
Author
Owner

@doctrinebot commented on GitHub (Jan 12, 2013):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jan 12, 2013): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (May 16, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-546] was closed:
https://github.com/doctrine/dbal/pull/546

@doctrinebot commented on GitHub (May 16, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-546] was closed: https://github.com/doctrine/dbal/pull/546
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2808