Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.0-ALPHA2
-
Fix Version/s: None
-
Component/s: ORM
-
Security Level: All
-
Labels:None
Description
The global namespace creates problems for entities that are retrieved via getClassMetadata($className) when $className is not prepended by "\". This is only a problem in the global namespace, because in other instances a slash might be present and the metadata factory does not find the relevant previously generated ClassMetadata instance.
This problem specifically occours with Annotations Mapping, since ReflectionClass::getName() returns the class name unqualified.
php -r 'namespace Foo { $r = new \ReflectionClass("\stdClass"); echo $r->getName();} '
I attached a Test-Case that proves this behaviour. It requires the additional attached Global namespace model data.