mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #845] [MERGED] Don't compute changeset for entities that are going to be deleted #8788
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?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/845
Author: @flack
Created: 11/11/2013
Status: ✅ Merged
Merged: 1/2/2014
Merged by: @beberlei
Base:
master← Head:avoid-update-on-delete📝 Commits (5)
9016a5adon't compute changeset for entities that are going to be deleted9807718Also skip entities scheduled for deletion when committing multiple entitiesffd858bMerge remote-tracking branch 'upstream/master' into avoid-update-on-delete88ae588Add testcase3d12920Add note about changed behaviour📊 Changes
3 files changed (+93 additions, -4 deletions)
View changed files
📝
UPGRADE.md(+12 -0)📝
lib/Doctrine/ORM/UnitOfWork.php(+4 -4)➕
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php(+77 -0)📄 Description
This is somewhat related to
http://www.doctrine-project.org/jira/browse/DDC-2761
I'm not sure if it fixes that particular problem, but it certainly helps with some unrelated issues I'm seeing in my code. My theory is that doctrine doesn't even need to compute changesets when an entity is scheduled to be removed, because all that would accomplish is to insert an UPDATE statement immediately before the DELETE statement for the entity.
The test suite passes, but I have not added a test specifically for this change (mostly because I wouldn't know exactly what to test). I could try to create one if necessary, though
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.