Doctrine和Annotation:表注释不是注释

时间:2014-10-23 09:47:00

标签: symfony doctrine-orm annotations

在Windows环境中,当我在AIX环境中部署时,一切都很好,并且发生了一些奇怪的事情。

以下是一些实体类的示例:

use Doctrine\ORM\Mapping as ORM;

/**
* AgentImpl
*
* @ORM\Table(name="AH2AGENT")
* @ORM\Entity
*/
class AgentImpl
{
  ....
}

我有这个例外:

[Semantical Error] The class "Doctrine\ORM\Mapping\Table" is not annotated with @Annotation. 
Are you sure this class can be used as annotation? 
If so, then you need to add @Annotation to the _class_ doc comment of "Doctrine\ORM\Mapping\Table". 
If it is indeed no annotation, then you need to add @IgnoreAnnotation("ORM\Table") to the _class_ doc comment of class Cramif\AccueilBundle\Entity\AgentImpl

这是什么意思?我该怎么做才能让它发挥作用?

由于

1 个答案:

答案 0 :(得分:0)

找到解决方案。希望它会帮助别人。

事实是我们正在使用eAccelarator:它会删除注释,因此注释不再起作用。

添加.htaccess或在vhost中:

php_flag eaccelerator.enable 0
php_flag eaccelerator.optimizer 0

并且有效