diff --git a/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php b/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php index 69aca9a826..cc89b1fc33 100644 --- a/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php +++ b/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php @@ -457,12 +457,9 @@ public function delete($document, array $options = array()) /** * Refreshes a managed document. * - * @param string $id * @param object $document The document to refresh. - * - * @deprecated The first argument is deprecated. */ - public function refresh($id, $document) + public function refresh($document) { $query = $this->getQueryForDocument($document); $data = $this->collection->findOne($query); diff --git a/lib/Doctrine/ODM/MongoDB/UnitOfWork.php b/lib/Doctrine/ODM/MongoDB/UnitOfWork.php index 35db25a69c..a7c4778e4c 100644 --- a/lib/Doctrine/ODM/MongoDB/UnitOfWork.php +++ b/lib/Doctrine/ODM/MongoDB/UnitOfWork.php @@ -2040,8 +2040,7 @@ private function doRefresh($document, array &$visited) if ( ! $class->isEmbeddedDocument) { if ($this->getDocumentState($document) == self::STATE_MANAGED) { - $id = $class->getDatabaseIdentifierValue($this->documentIdentifiers[$oid]); - $this->getDocumentPersister($class->name)->refresh($id, $document); + $this->getDocumentPersister($class->name)->refresh($document); } else { throw new \InvalidArgumentException('Document is not MANAGED.'); }