[PR #9429] Add failing test for failing to update child-parent relation when the child has been prefetched in QB #11611

Open
opened 2026-01-22 16:11:19 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/9429

State: closed
Merged: No


I have discovered this test case that reproduces bug when there's a child relation indexed

/**
 * @OneToMany(targetEntity=GH7212Child::class, mappedBy="parent", indexBy="id")
 * @var GH7212Child[]|Collection
 */
protected $children;

and then join in qb ->leftJoin('p.children', 'c')

then the relationship is not getting updated. $child->setParent(null) produces no change.

**Original Pull Request:** https://github.com/doctrine/orm/pull/9429 **State:** closed **Merged:** No --- I have discovered this test case that reproduces bug when there's a child relation indexed ``` /** * @OneToMany(targetEntity=GH7212Child::class, mappedBy="parent", indexBy="id") * @var GH7212Child[]|Collection */ protected $children; ``` and then join in qb `->leftJoin('p.children', 'c')` then the relationship is not getting updated. `$child->setParent(null)` produces no change.
admin added the pull-request label 2026-01-22 16:11:19 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#11611