mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2350: [GH-614] ObjectHydrator: fix entity namespaces. #2954
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@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):
Issue was closed with resolution "Invalid"
@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