Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Entity framework 班级';X';在链配置的命名空间中找不到。。。当我尝试与教义的多重联系时_Entity Framework_Symfony_Doctrine - Fatal编程技术网

Entity framework 班级';X';在链配置的命名空间中找不到。。。当我尝试与教义的多重联系时

Entity framework 班级';X';在链配置的命名空间中找不到。。。当我尝试与教义的多重联系时,entity-framework,symfony,doctrine,Entity Framework,Symfony,Doctrine,所以我知道这是另一个“在命名空间中找不到X类”,但我找不到我的senario的答案: 我有一个类“temp”(漂亮的名字),看起来像: namespace DbBccCrawlBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * * @ORM\Entity * @ORM\Table(name="temp") * */ class Temp { /** * @var integer * * @ORM\Column

所以我知道这是另一个“在命名空间中找不到X类”,但我找不到我的senario的答案:

我有一个类“temp”(漂亮的名字),看起来像:

namespace DbBccCrawlBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * 
 * @ORM\Entity
 * @ORM\Table(name="temp")
 * 
  */
 class Temp
 {

/**
 * @var integer
 *
 * @ORM\Column(name="id", type="integer", nullable=false)
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="IDENTITY")
 */
private $id;
以及
config.yml
中的orm:

orm:
    auto_generate_proxy_classes: "%kernel.debug%"
    entity_managers:
        extranet:
            naming_strategy: doctrine.orm.naming_strategy.underscore
            auto_mapping: true
        bdb:
            naming_strategy: doctrine.orm.naming_strategy.underscore
            connection: bdb
            mappings:
                DbBccBdbBundle: ~
        crawl:
            naming_strategy: doctrine.orm.naming_strategy.underscore
            connection: crawl
            mappings:
                DbBccCrawlBundle: ~
奇怪的是错误本身:

在链配置的命名空间FOS\UserBundle\Entity、AppBundle\Entity、DbBccBiproBundle\Entity中找不到类“DbBccCrawlBundle\Entity\Temp”

我不知道它为什么在这个捆绑包中搜索(它应该是dbbccrawlbundle
\Entity


我整个下午都在搜索,如果您有什么想法,请告诉我。

您以前是否更改了名称空间?也许您需要像这样清除缓存:
php-bin/console-cache:clear--env=prod
今天已经清除了数千次缓存。。。而且仍然不起作用,也许可以尝试grep递归,看看是否可以找到它包含在哪个文件中,比如:
grep-R“dbbciprobundle”src
Antoine~/c/Users/Antoine/git/bcc.extranet$grep-R“dbbciprobundle”src/dbbciprobundle/dbbciprobundle.php:namespace dbbciprobundle;php:classdbbccbiprobundle扩展bundleAnotoine~/c/Users/Antoine/git/bcc.extranet$grep-r“dbbccrawlbundle”src-src/dbbccrawlbundle/dbbccrawlbundle.php:namespace dbbccrawlbundle;src/DbBccCrawlBundle/DbBccCrawlBundle.php:classdbbcccrawlbundle扩展包src/DbBccCrawlBundle/Entity/Temp.php:namespace DbBccCrawlBundle\Entity;src/TechBundle/Controller/Crawl/CrawlStatusController.php:使用dbbccrawlbundle\Entity;src/TechBundle/Model/Crawl/CrawlStatusModel.php://$temp=new\DbBccCrawlBundle\Entity\temp;src/TechBundle/Model/Crawl/CrawlStatusModel.php:$temp=new\DbBccCrawlBundle\Entity\temp;