When I try to flush an entity that all work well but nothing fill my database but 0 errors... There is my controller:
/**
* @Security(\"is_anonymous() or is_aut
try to add repository file path in the document header like this:
/**
* @MongoDB\Document(repositoryClass="AppBundle\Repository\MessageUserRepository")
*/
class MessageUser
{}
And add these lines to your config file:
doctrine_mongodb:
connections:
default:
server: "%database_host%"
options:
username: "%database_user%"
password: '%database_password%'
db: "%database_name%"
authSource: "%database_name%"
default_database: '%database_name%'
document_managers:
default:
auto_mapping: true
then you need to call the manager in the controller file:
$dm = $this->get('doctrine_mongodb')->getManager();
I hope that works for you :)