mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #26] [CLOSED] Ddc 875 #7608
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/26
Author: @ccapndave
Created: 1/6/2011
Status: ❌ Closed
Base:
master← Head:DDC-875📝 Commits (1)
542689dDDC-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.