I have this error:
Fatal error: Uncaught exception 'Doctrine\Common\Persistence\Mapping\MappingException' with message 'File mapping drivers must have a valid directory path, however the given path [path/to/my/entities] seems to be incorrect
and i have this in my 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'
)
)
)
)
I had exactly the same problem. I solved it by creating an empty Entity
directory in the location where doctrine expect me to store my entities. All you have to do is create in following location an empty Entity
directory: __DIR__ . '/../src/Realez/Entity'
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With