[PR #845] [MERGED] Don't compute changeset for entities that are going to be deleted #8788

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

📋 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: masterHead: avoid-update-on-delete


📝 Commits (5)

  • 9016a5a don't compute changeset for entities that are going to be deleted
  • 9807718 Also skip entities scheduled for deletion when committing multiple entities
  • ffd858b Merge remote-tracking branch 'upstream/master' into avoid-update-on-delete
  • 88ae588 Add testcase
  • 3d12920 Add 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.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/845 **Author:** [@flack](https://github.com/flack) **Created:** 11/11/2013 **Status:** ✅ Merged **Merged:** 1/2/2014 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `avoid-update-on-delete` --- ### 📝 Commits (5) - [`9016a5a`](https://github.com/doctrine/orm/commit/9016a5a854b089d7fdbd06224afc862ab1f5a485) don't compute changeset for entities that are going to be deleted - [`9807718`](https://github.com/doctrine/orm/commit/980771810033d72346b02d08d1f115380bde70b5) Also skip entities scheduled for deletion when committing multiple entities - [`ffd858b`](https://github.com/doctrine/orm/commit/ffd858b238dcf476fc962d69a6a4ef72ae11614e) Merge remote-tracking branch 'upstream/master' into avoid-update-on-delete - [`88ae588`](https://github.com/doctrine/orm/commit/88ae5883f367b8db5d87aa471c32a1d395b696ad) Add testcase - [`3d12920`](https://github.com/doctrine/orm/commit/3d12920cd46b82b7cecf0f1f47270569d37d5e12) Add note about changed behaviour ### 📊 Changes **3 files changed** (+93 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `UPGRADE.md` (+12 -0) 📝 `lib/Doctrine/ORM/UnitOfWork.php` (+4 -4) ➕ `tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php` (+77 -0) </details> ### 📄 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:01:43 +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#8788