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;
}