Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Can't Fix
-
Affects Version/s: 2.0-BETA1
-
Fix Version/s: None
-
Component/s: ORM
-
Security Level: All
-
Labels:None
-
Environment:Linux Debian SID, PHP 5.3.2
Description
When I create an alias for entity namespace:
$config->setEntityNamespaces(array( 'Entities' => 'A\B\Entities', ));
and then use it in association mapping:
/** * @ManyToOne(targetEntity="Entities:Foo\Bar") */ private $bar;
Then the proxy for the target entity is not generated correctly. It generates proxy class name "Entities:Foo\BarProxy", instead of "ABEntitiesFooBarProxy". It obviously causes Parse error in PHP.
Aliases in targetEntity are not supported and can't be architecture-wise. Aliases only work in DQL Queries or for EntityManager::find() ::getRepository().