[PR #26] [CLOSED] Ddc 875 #7608

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/26
Author: @ccapndave
Created: 1/6/2011
Status: Closed

Base: masterHead: DDC-875


📝 Commits (1)

  • 542689d DDC-875 - When merging only add entities to a collection if they are not already there

📊 Changes

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

View changed files

📝 lib/Doctrine/ORM/UnitOfWork.php (+4 -1)

📄 Description

Merge can sometimes add the same entity twice into a collection.

As far as I can tell I am using unwrap() in order to check whether the element already exists in the array, but then calling >add() directly on the PersistentCollection rather than the ArrayCollection, triggering $this>changed().


🔄 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/26 **Author:** [@ccapndave](https://github.com/ccapndave) **Created:** 1/6/2011 **Status:** ❌ Closed **Base:** `master` ← **Head:** `DDC-875` --- ### 📝 Commits (1) - [`542689d`](https://github.com/doctrine/orm/commit/542689da0c855298b194b3a7cb1df927de91cd32) DDC-875 - When merging only add entities to a collection if they are not already there ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/UnitOfWork.php` (+4 -1) </details> ### 📄 Description Merge can sometimes add the same entity twice into a collection. As far as I can tell I am using unwrap() in order to check whether the element already exists in the array, but then calling >add() directly on the PersistentCollection rather than the ArrayCollection, triggering $this>changed(). --- <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:00 +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#7608