Skip to content
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

Type error when data from database is incompatible with mapping #2044

Closed
alcaeus opened this issue Jul 12, 2019 · 2 comments
Closed

Type error when data from database is incompatible with mapping #2044

alcaeus opened this issue Jul 12, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@alcaeus
Copy link
Member

alcaeus commented Jul 12, 2019

This is the root cause for the issue described in doctrine/DoctrineMongoDBBundle#564: a property was mapped as an embedded document, but the data received from the database was a scalar value. In order to avoid type errors, the hydration logic needs to better assert expected types.

@malarzm
Copy link
Member

malarzm commented Jul 16, 2019

FWIW have no idea we can fail gracefully if we expect an object and get a scalar. Unless more gracefully as throw an exception instead of a type error? :)

@alcaeus
Copy link
Member Author

alcaeus commented Oct 2, 2019

Fixed in #2073

@alcaeus alcaeus closed this as completed Oct 2, 2019
@alcaeus alcaeus added this to the 2.0.0-RC3 milestone Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants