[MODM-160] Errors when merging new documents with two levels of embedded documents Created: 11/Jan/12  Updated: 04/Feb/12  Resolved: 04/Feb/12

Status: Resolved
Project: Doctrine MongoDB ODM
Component/s: UnitOfWork
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Magnus Nordlander Assignee: Jonathan H. Wage
Resolution: Fixed Votes: 0
Labels: None

Mac OS X 10.7, All code is the latest version of master.


There's two different error messages that can be found from this.

If it's EmbedMany in an array (not an ArrayCollection), the following error message results:

Argument 1 passed to Doctrine\ODM\MongoDB\PersistentCollection::__construct() must implement interface Doctrine\Common\Collections\Collection, array given, called in mongodb-odm/lib/Doctrine/ODM/MongoDB/UnitOfWork.php on line 1830 and defined

Otherwise it's:

Undefined index: <blank>

Failing tests have been created and a PR has been submitted on GitHub: https://github.com/doctrine/mongodb-odm/pull/230

Comment by Jonathan H. Wage [ 04/Feb/12 ]

Fixed here https://github.com/doctrine/mongodb-odm/commit/3aca4495eab4fa5e4b6b0034d31dfe37b8f27f70

Generated at Sun Oct 04 16:01:09 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.