The passed document must be a managed document. If the document already has a change set
because this method is invoked during a commit cycle then the change sets are added.
whereby changes detected in this method prevail.
public recomputeSingleDocumentChangeSet ( |
||
$class | The class descriptor of the document. | |
$document | object | The document for which to (re)calculate the change set. |
/** * Invokes preUpdate callbacks and events for given document cascading them to embedded documents as well. * * @param ClassMetadata $class * @param object $document */ public function preUpdate(ClassMetadata $class, $document) { if (!empty($class->lifecycleCallbacks[Events::preUpdate])) { $class->invokeLifecycleCallbacks(Events::preUpdate, $document, array(new PreUpdateEventArgs($document, $this->dm, $this->uow->getDocumentChangeSet($document)))); $this->uow->recomputeSingleDocumentChangeSet($class, $document); } $this->evm->dispatchEvent(Events::preUpdate, new PreUpdateEventArgs($document, $this->dm, $this->uow->getDocumentChangeSet($document))); $this->cascadePreUpdate($class, $document); }
/** * Recompute the single object changeset from a UnitOfWork * * @param UnitOfWork $uow * @param ClassMetadataInfo $meta * @param Object $object * @return void */ public function recomputeSingleObjectChangeSet(UnitOfWork $uow, ClassMetadataInfo $meta, $object) { $uow->recomputeSingleDocumentChangeSet($meta, $object); }