2
我剛剛開始使用Symfony2,目前正嘗試從現有數據庫生成Doctrine實體。我正在關注official tutorial on the topic,但是,我想讓我的實體在默認(MyVendor\MyBundle\Model\Entity
而不是MyVendor\MyBundle\Entity
)之外的其他名稱空間中生成。Symfony 2 - 學說:映射:導入到自定義命名空間
我編輯的config.yml
文件是這樣的:
doctrine:
orm:
entity_managers:
default:
mappings:
MyBundle:
prefix: MyVendor\MyBundle\Model\Entity
dir: Model/Entity
不幸的是,我不能得到這個工作,因爲實體在默認命名空間和目錄仍產生。我究竟做錯了什麼?如下