简体   繁体   English

注释不存在,或无法自动加载

[英]The annotation does not exist, or could not be auto-loaded

I have some kind of strange problem with symfony and doctrine. 我对symfony和学说有一些奇怪的问题。 While sending project to development server getting an error: 将项目发送到开发服务器时出现错误:

[Doctrine\\Common\\Annotations\\AnnotationException] [Semantical Error] The annotation "@Doctrine\\ORM\\Mapping\\joinTable" in property Acme\\CampaignInterfaceBundle\\Entity\\Campaign::$users does not exist, or could not be auto-loaded. [Doctrine \\ Common \\ Annotations \\ AnnotationException] [语义错误]属性Acme \\ CampaignInterfaceBundle \\ Entity \\ Campaign :: $$用户中的注释“ @Doctrine \\ ORM \\ Mapping \\ joinTable”不存在,或者无法自动加载。

CODE part here: 此处的CODE部分:

use Doctrine\\ORM\\Mapping as ORM; 使用Doctrine \\ ORM \\ Mapping作为ORM;

 /** * @var Acme\\UsersBundle\\Entity\\User * * @ORM\\ManyToMany(targetEntity="Acme\\UsersBundle\\Entity\\User", inversedBy="campaigns") * @ORM\\joinTable(name="acme.campaign_users", * joinColumns={@ORM\\JoinColumn(name="campaign_id", referencedColumnName="id")}, * inverseJoinColumns={@ORM\\JoinColumn(name="user_id", referencedColumnName="id")} * ) */ private $users; 

Some namespace problem? 一些名称空间问题?

Problem was in 问题出在

@ORM\joinTable(name="jcdecaux.campaign_users", ...

joinTable should be capitalized as in joinTable应该大写,如

@ORM\JoinTable, ...

暂无
暂无

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

相关问题 属性中的注释不存在,或者无法自动加载 - The annotation in property does not exist, or could not be auto-loaded Symfony2注释“ @Gedmo \\ Mapping \\ Annotation \\ Timestampable”不存在,或者无法自动加载 - Symfony2 The annotation “@Gedmo\Mapping\Annotation\Timestampable” does not exist, or could not be auto-loaded Symfony4 : 注释不存在,或无法自动加载 (Symfony\\Component\\Validator\\Constraints) - Symfony4 : The annotation does not exist, or could not be auto-loaded (Symfony\Component\Validator\Constraints) Entities \\ USER_User类中的注释“@Doctrine \\ ORM \\ Mapping \\ Entity”不存在,或者无法自动加载 - The annotation “@Doctrine\ORM\Mapping\Entity” in class Entities\USER_User does not exist, or could not be auto-loaded JMSSerializer独立 - 注释不存在,或者无法自动加载 - JMSSerializer stand alone - Annotation does not exist, or cannot be auto-loaded 自定义约束验证器不存在,或无法自动加载 - Custom constraint validator does not exist, or could not be auto-loaded symfony 3 [语义错误]类AppBundle \\ Entity \\ User中的注释@Doctrine \\ ORM \\ Mapping \\ Model不存在,或者无法自动加载 - symfony 3 [Semantical Error] The annotation @Doctrine\ORM\Mapping\Model in class AppBundle\Entity\User does not exist, or could not be auto-loaded Doctrine 2 Gedmo扩展无法正常工作并出现错误:“不存在,或无法自动加载” - Doctrine 2 Gedmo extensions not working with error: “does not exist, or could not be auto-loaded” 方法中的“@Sensio\Bundle\FrameworkExtraBundle\Configuration\Route”……不存在,或无法自动加载” - “@Sensio\Bundle\FrameworkExtraBundle\Configuration\Route” in method … does not exist, or could not be auto-loaded" Symfony 2 - 属性中的注释不存在,或者无法自动加载。 - Symfony 2 - The annotation in property does not exist, or could not be auto-loaded.
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM