doctrine/phpcr-odm — comment on commit 3c81db9d6555175bd7a6159e7862ec4cfab9356a
File: lib/Doctrine/ODM/PHPCR/UnitOfWork.php line 463
By starkj:

In general I’m making use of ReferenceManyCollection and not of MultivaluePropertyCollection as in some places there is a different treatment for “normal” multivalued properties which are stored in MultivaluePropertyCollections. ReferenceManyCollection is just there to make the difference more explicit.

Concerning this line: If the document was already persisted before the referenced documents are handled in a ReferenceManyCollection. So I’m checking for a ReferenceManyCollection object. The “is_array”-check is done for new documents where the user is assigning many references to one property by normal PHP array syntax.