When trying to create the database from generated Entity classes with inheritance I get an AnnotationException
.
This is an example entity:
/**
* @ORM\Entity
* @ORM\InheritanceType("JOINED")
* @ORM\DiscriminatorColumn(name="dtype", type="string")
* @ORM\DiscriminatorMap({
* administrator="Application\Model\Entity\Administrator"
* })
*/
class User
{
//...
}
This is the error I get:
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] Couldn't find constant administrator, class Application\Model\Entity\User.
It seems that the keys in the DiscriminatorMap should be quoted like this:
* @ORM\DiscriminatorMap({
* "administrator"="Application\Model\Entity\Administrator"
* })