Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0.0BETA1
-
Component/s: Collections
-
Labels:None
Description
Getting following error when trying to use MongoGridFs files with referenceMany:
Argument 2 passed to Doctrine\ODM\MongoDB\UnitOfWork::getOrCreateDocument() must be an array, object given, called in D:\Work\www\syter2.localhost.dev\library\Doctrine\ODM\MongoDB\PersistentCollection.php on line 110 and defined D:\Work\www\syter2.localhost.dev\library\Doctrine\ODM\MongoDB\UnitOfWork.php:1719
As far as I understand queries against MongoGridFS collection return instances of MongoGridFSFile, while PersistentCollection only expects arrays (as with regular collections)
I think Issue appeared after latest updates from git. Because I didn't experience it with ALPHA1 (didn't test with ALPHA2)
I'll check it out, if you can provide a test that'd be helpful.