Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #813 from solocommand/patch-1

Updated preUpdate example in events doc
  • Loading branch information...
commit e99d818b4224b35fab38abc230696d9282a1ecea 2 parents 3743acb + 987594c
@jwage jwage authored
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);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.