[PR #82] [CLOSED] Moved isInitalized assignment to be after the persister load to prevent bad change set computations #7682

Open
opened 2026-01-22 15:56:21 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/82
Author: @beckycase
Created: 7/8/2011
Status: Closed

Base: masterHead: patch-1


📝 Commits (1)

  • 1377bc3 Moved isInitalized assignment to be after the persister load. If set before, the entity isn't correctly entered into unitOfWork's originalData array due a failing if entity->isInitalized in createEntity. This causes the changeSet to be computed incorrectly during flush and in worse case scenarios can result in an additional bad insert of existing data.

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 lib/Doctrine/ORM/Proxy/ProxyFactory.php (+1 -1)

📄 Description

Moved isInitalized assignment to be after the persister load. If set before, the entity isn't correctly entered into unitOfWork's originalData array due a failing if entity->isInitalized in createEntity. This causes the changeSet to be computed incorrectly during flush and in worse case scenarios can result in an additional bad insert of existing data.


🔄 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/82 **Author:** [@beckycase](https://github.com/beckycase) **Created:** 7/8/2011 **Status:** ❌ Closed **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`1377bc3`](https://github.com/doctrine/orm/commit/1377bc38fffb8e4bcf8f3f05ab73b4d8856a1fcb) Moved isInitalized assignment to be after the persister load. If set before, the entity isn't correctly entered into unitOfWork's originalData array due a failing if entity->__isInitalized__ in createEntity. This causes the changeSet to be computed incorrectly during flush and in worse case scenarios can result in an additional bad insert of existing data. ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Proxy/ProxyFactory.php` (+1 -1) </details> ### 📄 Description Moved isInitalized assignment to be after the persister load. If set before, the entity isn't correctly entered into unitOfWork's originalData array due a failing if entity->**isInitalized** in createEntity. This causes the changeSet to be computed incorrectly during flush and in worse case scenarios can result in an additional bad insert of existing data. --- <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 15:56:21 +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#7682