我正在尝试让 ZF2 快速入门与 Doctrine 一起使用。我以为我已正确设置它,但出现以下错误。有人看过吗?
文件:/Users/jhicks/workspace/zf2-example/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php:38 消息:在链配置命名空间 ZfcUser\Entity、\Entity、ZfcUserDoctrineORM\Entity
这是我的教义配置:
return array(
'doctrine' => array(
'driver' => array(
__NAMESPACE__ . '_driver' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'cache' => 'array',
'paths' => array(__DIR__ . '/../src/' . __NAMESPACE__ . '/Entity')
),
'orm_default' => array(
'drivers' => array(
__NAMESPACE__ . '\Entity' => __NAMESPACE__ . '_driver'
)
)
),
'connection' => array(
'orm_default' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'localhost',
'port' => '3306',
'dbname' => 'zf2example',
'user' => 'user',
'password' => 'password'
),
)
)
),
);