Skip to content

Instantly share code, notes, and snippets.

@doctrinebot
Created December 13, 2015 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctrinebot/3424daaf55f8884b850b to your computer and use it in GitHub Desktop.
Save doctrinebot/3424daaf55f8884b850b to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DDC-1410 - https://github.com/doctrine/doctrine2/issues/2034
### Eclipse Workspace Patch 1.0
#P LeezyServer
Index: libraries/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php
===================================================================
--- libraries/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php (revision 7427)
+++ libraries/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php (working copy)
@@ -363,10 +363,7 @@
$this->_resultPointers[$dqlAlias] = $reflFieldValue[$index];
}
} else if ( ! $reflField->getValue($parentObject)) {
- $coll = new PersistentCollection($this->_em, $this->_ce[$entityName], new ArrayCollection);
- $coll->setOwner($parentObject, $relation);
- $reflField->setValue($parentObject, $coll);
- $this->_uow->setOriginalEntityProperty($oid, $relationField, $coll);
+ $reflFieldValue = $this->_initRelatedCollection($parentObject, $parentClass, $relationField);
}
} else {
// PATH B: Single-valued association
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment