-
-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Nullable embedded documents not initialized #2453
Comments
I don't think this is related as nothing mapping related changed in #2302. I'd rather guess that your document has no |
We tried both cases:
I think, that field need to be initialised with null even in case of absence in database document (In case we embed collection of documents, it is initialised with empty collection in any case, even if there is no such key in database). Or there are another ways to deal with this? |
Try making
Is the error coming from hydration as well? |
Using 3 should still make projection "work" as the
|
Thank you! This works well. |
Bug Report
Summary
Problem is quite similar to #2301, but we try to configure not with xml, but with attributes.
Current behavior
On loading document without Image subdocument we get error
Typed property Publication::$image must not be accessed before initialization
on request
$pub->getImage();
Expected behavior
Get null.
The text was updated successfully, but these errors were encountered: