mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Discriminator Bug: lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php #6442
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?
Originally created by @AndreyMashukov on GitHub (Apr 10, 2020).
Bug Report
Summary
lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php:441
Current behavior
so, if you have discriminator entity
Contact(abstract class) and two children:RealtorandOwnerfor example, and usetargetEntity=Contactin the some class, for example it isAdvert, it will crush when you will try to hydrate it as object viaResultSetMappingBuilderHow to reproduce
Set super class as target entity and try to get result with ObjectHydrator.php
Expected behavior
ObjectHydrator will return correct
Contact's childHow to fix?
just fix 441 line
@AndreyMashukov commented on GitHub (Apr 10, 2020):