繁体   English   中英

原则和注释:表注释不是注释

[英]Doctrine and Annotation : table annotation is not an annotation

在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

这意味着什么 ? 我应该怎么做才能使其正常工作?

谢谢

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

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

添加.htaccess或在虚拟主机内:

php_flag eaccelerator.enable 0
php_flag eaccelerator.optimizer 0

它有效

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM