Skip to content
Browse files

Fix #230 and MODM-160

  • Loading branch information...
1 parent bc7a55a commit 3aca4495eab4fa5e4b6b0034d31dfe37b8f27f70 @jwage jwage committed Feb 4, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/Doctrine/ODM/MongoDB/UnitOfWork.php
View
3 lib/Doctrine/ODM/MongoDB/UnitOfWork.php
@@ -1939,6 +1939,9 @@ private function doMerge($document, array &$visited, $prevManagedCopy = null, $a
}
if ( ! $mergeCol instanceof PersistentCollection) {
+ if ( ! $mergeCol instanceof Collection) {
+ $mergeCol = new ArrayCollection($mergeCol);
+ }
$mergeCol = new PersistentCollection($mergeCol, $this->dm, $this, $this->cmd);
$mergeCol->setInitialized(true);
} else {

0 comments on commit 3aca449

Please sign in to comment.
Something went wrong with that request. Please try again.