[PR #814] [CLOSED] Fixed a situation where unnecessary sql UPDATE statements were issued fo... #8744

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/814
Author: @iBiryukov
Created: 10/6/2013
Status: Closed

Base: masterHead: dateTimeChangeCompute


📝 Commits (2)

  • e1416c2 Fixed a situation where unnecessary sql UPDATE statements were issued for unchanged DateTime objects
  • 7ac129e Comment update

📊 Changes

2 files changed (+57 additions, -2 deletions)

View changed files

📝 lib/Doctrine/ORM/UnitOfWork.php (+2 -1)
📝 tests/Doctrine/Tests/ORM/UnitOfWorkTest.php (+55 -1)

📄 Description

...r unchanged DateTime objects

computeChangeSet method in unitOfWork compares original and new data using 'identical' (===) operator. This works well, except for DateTime objects.

Two different DateTime objects that contain the same data, should not trigger an unnecessary UPDATE query.

I made changes to account for this case.


🔄 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/814 **Author:** [@iBiryukov](https://github.com/iBiryukov) **Created:** 10/6/2013 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dateTimeChangeCompute` --- ### 📝 Commits (2) - [`e1416c2`](https://github.com/doctrine/orm/commit/e1416c2071a8c56b27387b5533eb6996c538c7e0) Fixed a situation where unnecessary sql UPDATE statements were issued for unchanged DateTime objects - [`7ac129e`](https://github.com/doctrine/orm/commit/7ac129e7e6d4087ab6b2a8ff42f8d71923a6ad99) Comment update ### 📊 Changes **2 files changed** (+57 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/UnitOfWork.php` (+2 -1) 📝 `tests/Doctrine/Tests/ORM/UnitOfWorkTest.php` (+55 -1) </details> ### 📄 Description ...r unchanged DateTime objects computeChangeSet method in unitOfWork compares original and new data using 'identical' (===) operator. This works well, except for DateTime objects. Two different DateTime objects that contain the same data, should not trigger an unnecessary UPDATE query. I made changes to account for this case. --- <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:30 +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#8744