DDC-2350: [GH-614] ObjectHydrator: fix entity namespaces. #2954

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

Originally created by @doctrinebot on GitHub (Mar 14, 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 jelmersnoeck:

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

Message:

Object Hydrator: fix entity namespaces

If you are using Entity Namespace aliases, the ObjectHydrator will throw a notice for an undefined index of your entity namespace.

Problem

The problem lies in the fact that the prepare() method uses the "className", used in the aliasMap (where you use the namespace alias) to store the local ClassMetadata cache. Though, in a later stage the actual namespace is being used to find this same item.

Fix

I've changed the way this ClassMetadata cache is built. It now uses the full Entity namespace.

Originally created by @doctrinebot on GitHub (Mar 14, 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 jelmersnoeck: Url: https://github.com/doctrine/doctrine2/pull/614 Message: # Object Hydrator: fix entity namespaces If you are using Entity Namespace aliases, the ObjectHydrator will throw a notice for an undefined index of your entity namespace. ## Problem The problem lies in the fact that the prepare() method uses the "className", used in the aliasMap (where you use the namespace alias) to store the local ClassMetadata cache. Though, in a later stage the actual namespace is being used to find this same item. ## Fix I've changed the way this ClassMetadata cache is built. It now uses the full Entity namespace.
admin added the Bug label 2026-01-22 14:08:19 +01:00
admin closed this issue 2026-01-22 14:08:20 +01:00
Author
Owner

@doctrinebot commented on GitHub (May 4, 2013):

Comment created by @doctrinebot:

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

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

@doctrinebot commented on GitHub (May 4, 2013):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (May 4, 2013): Issue was closed with resolution "Invalid"
Author
Owner

@doctrinebot commented on GitHub (Jun 27, 2014):

Comment created by @doctrinebot:

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

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

No dependencies set.

Reference: doctrine/archived-orm#2954