mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2986: OrphanRemoval no longer works on OneToMany relationships after latest Symfony update - 2.3.10 #3712
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 (Feb 18, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user dotlabel-scott:
Since release of Symfony version 2.3.10 the orphanRemoval feature in a doctrine entity no longer removes deleted entities.
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by @ocramius:
Needs a failing test case or better description
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by dotlabel-scott:
In Symfony version 2.3.9 when using an arrayCollection, if the items are removed from the arrayCollection then flushed the items are removed from the database.
Below are the mapped and inversed sides of the one to many relationship. When the Flush is carried out in Symfony 2.3.9 this works as expected although in 2.3.10 the items are not removed from the database.
I originally opened this as a Symfony issue although they have just said it is a doctrine issue.
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by @ocramius:
This should be verified against doctrine ORM in insulation - "symfony 2.3.9" vs "symfony 2.3.10" doesn't make any difference for the ORM itself, since it is a different unrelated library.
You should probably reduce the scope of the search by looking at the diffs in your
composer.lockfile so that we can identify if there was a breakage, and where.@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by dotlabel-scott:
Below is the composer.lock diff. The only change is the Symfony version and this is the difference between it working and not working.
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by @ocramius:
This seems to be only a symfony change - no upgrades/downgrades in doctrine packages?
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by dotlabel-scott:
Yeah that's correct. That's what I tried to say on the Symfony issue but they closed it straight away. Something in the latest Symfony update has stopped the orphanRemoval annotation from working.
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by dotlabel-scott:
A fix has been committed to Symfony so this can be closed.
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by dotlabel-scott:
Issue was related to Symfony and is now fixed
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by @ocramius:
[~dotlabel-scott] reference to the commit?
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by dotlabel-scott:
This commit fixed the issue -
c4ffe02100@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by @ocramius:
Not related to ORM
@doctrinebot commented on GitHub (Feb 18, 2014):
Issue was closed with resolution "Invalid"
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by @ocramius:
[~dotlabel-scott] thanks - changed resolution
@doctrinebot commented on GitHub (Feb 18, 2014):
Comment created by stof:
Yeah, the actual issue is indeed not related to the ORM at all. But the bug report was totally wrong (which is why I classified it as a Doctrine issue): the Symfony bug has nothing to do with orphanRemoval (it is not only the related entity which was not deleted. The element was not removed from the collection at all)