-
-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GridFs HydratorException : Expected association field "metadata" to be of type "array", "object" received #2599
Comments
Hi @Webixel, what version of the driver are you running? You can find out the version of the MongoDB library by running |
Hi @alcaeus , thank you for the quick reply.
|
Yes, thanks. It works by modifying in the mongo client
|
Bug Report
Summary
When I want to retrieve the metadata of the newly inserted file, I get a hydrator error that returns to me.
Current behavior
Throws a fatal error when property is accessed:
Fatal error: Uncaught Doctrine\ODM\MongoDB\Hydrator\HydratorException: Expected association for field "metadata" in document of type "Documents\Fichier" to be of type "array", "object" received.
How to reproduce
Controller
Fichier Document
Fichiermetadata Document
Expected behavior
I want to retrieve an array or an object with the different metadata of the file saved previously
The text was updated successfully, but these errors were encountered: