mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #6358] ObjectHydrator: fixed initialization of left joined collections #9947
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/6358
State: closed
Merged: No
There is initialization of collections which are considered to be empty and are not fetched twice from commit
3407620bf8.But implementation is wrong, it decided collection to be empty from first row only. If there were data in next row collection was already initialized. So it all ended with empty related collections marked as initialized.
How to replicate bug:
where id_0 is order id and id_1 product item id
because every collection was marked as initialized while hydrating first row which had no data.
While hydrating rows with data, it didn`t passed through condition in \Doctrine\ORM\Internal\Hydration\ObjectHydrator::initRelatedCollection