diff --git a/src/Hydrator/ODM/MongoDB/Strategy/EmbeddedCollection.php b/src/Hydrator/ODM/MongoDB/Strategy/EmbeddedCollection.php index 4730693..b796af6 100644 --- a/src/Hydrator/ODM/MongoDB/Strategy/EmbeddedCollection.php +++ b/src/Hydrator/ODM/MongoDB/Strategy/EmbeddedCollection.php @@ -93,7 +93,7 @@ protected function hydrateSingle($targetDocument, $document) } $rc = new \ReflectionClass($targetDocument); - $object = $rc->newInstanceWithoutConstructor(); + $object = $rc->newInstance(); $hydrator = $this->getDoctrineHydrator($targetDocument); $hydrator->hydrate($document, $object); diff --git a/src/Hydrator/ODM/MongoDB/Strategy/EmbeddedField.php b/src/Hydrator/ODM/MongoDB/Strategy/EmbeddedField.php index 0ebb239..7ccbc02 100644 --- a/src/Hydrator/ODM/MongoDB/Strategy/EmbeddedField.php +++ b/src/Hydrator/ODM/MongoDB/Strategy/EmbeddedField.php @@ -40,7 +40,7 @@ public function hydrate($value) } $rc = new \ReflectionClass($targetDocument); - $object = $rc->newInstanceWithoutConstructor(); + $object = $rc->newInstance(); $hydrator = $this->getDoctrineHydrator($targetDocument); $hydrator->hydrate($value, $object);