Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Updated preUpdate example in events doc #813

Merged
merged 1 commit into from

3 participants

@solocommand

Documentation update for #810

@jwage
Owner

Thank you!

fonz

@jwage jwage merged commit e99d818 into doctrine:master
@jmikola jmikola added this to the 1.0.0-BETA10 milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2014
  1. @solocommand
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/en/reference/events.rst
View
2  docs/en/reference/events.rst
@@ -477,7 +477,7 @@ Define the ``EventTest`` class with a ``preUpdate()`` method:
$document = $eventArgs->getDocument();
$document->setSomething();
$dm = $eventArgs->getDocumentManager();
- $class = $dm->getClassMetadata();
+ $class = $dm->getClassMetadata(get_class($document));
$dm->getUnitOfWork()->recomputeSingleDocumentChangeSet($class, $document);
}
}
Something went wrong with that request. Please try again.