我正在进行ZF2 MongoDB ODM身份验证,但获得错误时“在创建”doctrine.documentmanager.odm_default“时引发了一个异常;没有返回任何实例”,并且“驱动程序必须使用来自ZF2 MongoDB ODM身份验证教程的配置指定一个类”。


任何帮助都将不胜感激,谢谢
发布于 2013-09-16 14:21:00
我为此做了两件事。我已经解决了它通过改变司机的路径,因为它没有分配。
'odm_driver' => array(
'class' => 'Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver',
'paths' => array(__DIR__ . '/../src/' . __NAMESPACE__ . '/Document')
),
'odm_default' => array(
'drivers' => array(
__NAMESPACE__ . '\Document' => 'odm_driver'
)
)然后我在用户管理/文档/用户中创建了getUsername和getPassword的两个对象
public function getUsername(){
return $this->username;
}
public function getPassword(){
return $this->password;
}https://stackoverflow.com/questions/18827698
复制相似问题