mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3765: [GH-1419] [DDC-3382] Allow orphan removal to be cancelled #4616
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 11, 2015).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of c960657:
Url: https://github.com/doctrine/doctrine2/pull/1419
Message:
I have a one-to-many relation with orphanRemoval=true.
If I remove an entity from the related collection and add it back, the entity is removed from the database.
The expected behaviour is to leave the entity in the database, because it was present in the PersistentCollection when $em->persist() was called.
This has previously been suggested in [DDC-3382](http://www.doctrine-project.org/jira/browse/[DDC-3382]%28http://www.doctrine-project.org/jira/browse/DDC-3382%29), but it was rejected. This PR shows how small a change it is, so I hope the suggestion will be reconsidered in the light of this.
@doctrinebot commented on GitHub (Jun 11, 2015):
@doctrinebot commented on GitHub (Jun 16, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1419] was merged:
https://github.com/doctrine/doctrine2/pull/1419