Reputation: 5066
How does Symfony2 determine the short name of a Doctrine entity?
For example Acme\DefaultBundle\Entity\User
becomes AcmeDefaultBundle:User
.
What about Acme\DefaultBundle\Entity\Group\UserGroup
?
Upvotes: 1
Views: 2418
Reputation: 5066
Acme\DefaultBundle\Entity\Group\UserGroup
would be AcmeDefaultBundle:Group\UserGroup
.
The part of the short name after the colon, is just appended directly to the converted namespace.
From Doctrine\ORM\Mapping\ClassMetadataFactory
:
protected function getFqcnFromAlias($namespaceAlias, $simpleClassName)
{
return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
}
Upvotes: 1