Question

i m doing ZF2 MongoDB ODM authentication but getting the error "An exception was raised while creating "doctrine.documentmanager.odm_default"; no instance returned" and "Drivers must specify a class" i m using the configuration from the ZF2 MongoDB ODM authentication Tutorial error 1 error 2

any help would be appreciated, thanks

Was it helpful?

Solution

i have done two things to do it. 1-i have solved it by changing the Drivers path as it was not assigning.

'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'
    )
)

2-then i made two objects of getUsername and getPassword in the user Admin/Document/user

public function getUsername(){
    return $this->username;     
}

public function getPassword(){
    return $this->password;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top