mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #1309] [DDC-3582] Fix hydration of nested embeddables #9370
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/1309
State: closed
Merged: No
The wrong class is chosen when hydrating embeddables that are part of a nested structure. See
DDC3582Testfor a demonstration. The fix is to useclassinstead ofembeddedClassto instantiate the embeddable in ReflectionEmbeddedProperty.The test I removed from ReflectionEmbeddedPropertyTest was failing because you cannot instantiate an abstract class (and rightfully so). However, as this would not be possible in practice anyway (you always end up extending the abstract class), I think this test can be removed safely.