We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dear Doctrine Team,
In your documentation ( https://github.com/doctrine/mongodb-odm/blob/master/docs/en/reference/events.rst#preupdate ) about preUpdate EventListeners you have
$class = $dm->getClassMetadata();
but in the Code https://github.com/doctrine/mongodb-odm/blob/master/lib/Doctrine/ODM/MongoDB/DocumentManager.php#L283 the function needs the class as argument.
Do I use the wrong DocumentManager or is it a bug in the documentation. What is the correct behavior?
Should I use something like this:
$class = $dm->getClassMetadata(get_class($document);
thank you very much, sebastian
The text was updated successfully, but these errors were encountered:
Yes, looks like the docs are wrong. get_class($document) should work fine!
Sorry, something went wrong.
I believe this ticket can be closed, PR was merged
No branches or pull requests
Dear Doctrine Team,
In your documentation ( https://github.com/doctrine/mongodb-odm/blob/master/docs/en/reference/events.rst#preupdate ) about preUpdate EventListeners you have
$class = $dm->getClassMetadata();
but in the Code https://github.com/doctrine/mongodb-odm/blob/master/lib/Doctrine/ODM/MongoDB/DocumentManager.php#L283 the function needs the class as argument.
Do I use the wrong DocumentManager or is it a bug in the documentation.
What is the correct behavior?
Should I use something like this:
$class = $dm->getClassMetadata(get_class($document);
thank you very much, sebastian
The text was updated successfully, but these errors were encountered: