Document registration
You need to register the differents documents namespace to make possible use it with Doctrine ODM, eg:
$app->register(new MongoDBODMServiceProvider(), array(
// ...
'doctrine.odm.mongodb.documents' => array(
0 => array(
'type' => 'annotation',
'path' => array(
'src/Acme/Entities',
),
'namespace' => 'Acme/Entities',
'alias' => 'docs',
),
),
// ...
));
you can add multiple folders/namespaces.
PHP Warning: Illegal offset type in ../vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php on line 82
PHP Warning: trim() expects parameter 1 to be string, array given in ../vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Configuration.php on line 67
There is a line in documentation:
But actually if I do:
I get an error: