[PR #181] [CLOSED] make merge copy non persisted properties too #7823

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/181
Author: @docteurklein
Created: 11/2/2011
Status: Closed

Base: masterHead: merge_non_mapped_properties


📝 Commits (1)

  • d827f8d make merge copy non persited properties too

📊 Changes

3 files changed (+35 additions, -2 deletions)

View changed files

📝 lib/Doctrine/ORM/UnitOfWork.php (+3 -1)
📝 tests/Doctrine/Tests/Models/CMS/CmsUser.php (+5 -1)
📝 tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php (+27 -0)

📄 Description

The behavior of merging should be to return a managed object with exactly the same values than the detached one.

The problem was that it only copies persistable properties.


🔄 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/181 **Author:** [@docteurklein](https://github.com/docteurklein) **Created:** 11/2/2011 **Status:** ❌ Closed **Base:** `master` ← **Head:** `merge_non_mapped_properties` --- ### 📝 Commits (1) - [`d827f8d`](https://github.com/doctrine/orm/commit/d827f8d447dcedc5eef84d5abbab4beac38d179f) make merge copy non persited properties too ### 📊 Changes **3 files changed** (+35 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/UnitOfWork.php` (+3 -1) 📝 `tests/Doctrine/Tests/Models/CMS/CmsUser.php` (+5 -1) 📝 `tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php` (+27 -0) </details> ### 📄 Description The behavior of merging should be to return a managed object with _exactly_ the same values than the detached one. The problem was that it only copies persistable properties. --- <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:57:03 +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#7823