/** * Refreshes a managed document. * * @param object $document The document to refresh. */ public function refresh($document) { $id = $this->uow->getDocumentIdentifier($document); if ($this->dm->loadByID($this->class->name, $id) === null) { throw new \InvalidArgumentException(sprintf('Could not loadByID because ' . $this->class->name . ' ' . $id . ' does not exist anymore.')); } }
/** * Refreshes a managed document. * * @param object $document The document to refresh. */ public function refresh($document) { $id = $this->_uow->getDocumentIdentifier($document); $this->_dm->loadByID($this->_class->name, $id); }