-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
ObjectHydrator
and ArrayHydrator
incorrectly hydrate fields of child classes in a JTI when a field name collides
#6303
Comments
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
… (which is bullshit), so we use `array` here
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
Ocramius
added a commit
that referenced
this issue
Aug 19, 2017
…/JTI require additional information and checks in the hydration process
Handled in #6304 |
Ocramius
changed the title
ObjectHydrator and ArrayHydrator fail on multiple inheritance with empty simpleArray
Aug 19, 2017
ObjectHydrator
and ArrayHydrator
incorrectly hydrate fields of child classes in a JTI when a field name collides
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I have an entity named A, which is extended on multi table inheritance by B and C.
Both have a property called $user, which is a simple string on B and a simple_array on C.
If I load the object by query builder with the repository of A and get an object of type B, I could get an empty array, even if I'm expecting a string. This is because AbstractHydrator is setting first non null value from all the joined tabled after translating it into php. Null is converted into array in SimpleArrayType convertToPHPValue function.
An easy solution could be to check for the value to be null BEFORE assigning it, as for #5989
The text was updated successfully, but these errors were encountered: