Skip to content
Browse files

Updated preUpdate example in events doc

  • Loading branch information...
1 parent 3743acb commit 987594c6d7542d465fd7e2cd2fee951080009ada @solocommand solocommand committed Feb 26, 2014
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);
}
}

0 comments on commit 987594c

Please sign in to comment.
Something went wrong with that request. Please try again.