The class 'X' was not found in the chain configured namespaces … when I try a multiple connection with doctrine

荒凉一梦 提交于 2020-02-08 07:41:23

问题


So I know this is another "class X not found in namespace" but I can't find an answer to my senario:

I have a class "temp" (pretty name) that looks like that :

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;

and the orm in config.yml :

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: ~

the weird thing is the error itself :

The class 'DbBccCrawlBundle\Entity\Temp' was not found in the chain configured namespaces FOS\UserBundle\Entity, AppBundle\Entity, DbBccBiproBundle\Entity

I don't know why it search in this bundle (it should be DbBccCrawlBundle\Entity instead)

I've been searching all this afternoon, if you've got some ideas, please let me know.

来源:https://stackoverflow.com/questions/43211923/the-class-x-was-not-found-in-the-chain-configured-namespaces-when-i-try-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!