mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-634: Merging an entity with a single valued association that has been set to null has no effect #781
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 @doctrinebot on GitHub (Jun 12, 2010).
Jira issue originally created by user ccapndave:
When merging an owning entity which has NULL as one of its associated properties, merge doesn't realize that it needs to disassociate the entity.
Assume that in the database there exists a doctor id=1 and a patient id=1. The patient belongs to the doctor, so the patient table has doctor_id = 1;
This does not set doctor_id to null as expected.
It can be fixed by changing the block at line 1373 in UnitOfWork.php as follow. Apologies for not providing a patch file, I haven't quite got the hang of git yet :)
@doctrinebot commented on GitHub (Jul 30, 2010):
Comment created by romanb:
Fixed in
69073c4b37@doctrinebot commented on GitHub (Jul 30, 2010):
Issue was closed with resolution "Fixed"