我有这个错误:
致命错误:未捕获的异常“Doctrine\Common\Persistence\Mapping\MappingException”与消息“文件映射驱动程序必须具有有效的目录路径,但是给定的路径 [path/to/my/entities] 似乎不正确
我的module.config.php中有这个:
'doctrine' => array(
'driver' => array(
// defines an annotation driver with two paths, and names it `my_annotation_driver`
'my_annotation_driver' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'cache' => 'array',
'paths' => array(
__DIR__ . '/../src/Realez/Entity',
'another/path'
),
),
// default metadata driver, aggregates all other drivers into a single one.
// Override `orm_default` only if you know what you're doing
'orm_default' => array(
'drivers' => array(
// register `my_annotation_driver` for any entity under namespace `My\Namespace`
'Realez/Entity' => 'my_annotation_driver'
)
)
)
)