我在Site下有两个捆绑包。我在User中创建的任何实体都被处理但是添加到Core的任何实体都被跳过了..我将所有实体从User移动到Core并创建了一个文本Entity但是我知道了错误:
No Metadata Classes to process.
测试类看起来像这样:
<?php
namespace Site\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Test
*
* @ORM\Table(name="user_address_type")
* @ORM\Entity
*/
class Test
{
/**
* @var integer
*
* @ORM\Column(name="Test", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $addressTypeId;
/**
* @var string
*
* @ORM\Column(name="address_description", type="string", length=100, nullable=true)
*/
private $address_description;
}
我的配置是:
# Doctrine Configuration
doctrine:
dbal:
default_connection: default
connections:
default:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
# if using pdo_sqlite as your database driver, add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# path: "%database_path%"
orm:
default_entity_manager: default
entity_managers:
default:
connection: default
mappings:
SiteCoreBundle: ~
SiteUserBundle: ~
我搜遍了整个地方,找不到答案。壁橱是关于使用多个连接,这是配置的来源。
谢谢..