[PR #523] [MERGED] [DDC-2074] Bugfix regarding clearing cloned PersistentCollections #8324

Closed
opened 2026-01-22 15:59:24 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/523
Author: @jankramer
Created: 11/25/2012
Status: Merged
Merged: 11/25/2012
Merged by: @beberlei

Base: masterHead: DDC-2074


📝 Commits (2)

  • 9b78100 [DDC-2074] Added test for PersistentCollection#clear.
  • 5b3f544 [DDC-2074] Fixed bug regarding clearing PC's without owner

📊 Changes

2 files changed (+30 additions, -1 deletions)

View changed files

📝 lib/Doctrine/ORM/PersistentCollection.php (+1 -1)
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2074Test.php (+29 -0)

📄 Description

When calling clear on a PC that has no owner (e.g. because it was cloned), it can't be deleted as there is no metadata available (that's essentially the exception mentioned in the ticket). In these cases, I think it shouldn't be scheduled for deletion, but please have a look as my knowledge of the ORM internals is limited.


🔄 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/523 **Author:** [@jankramer](https://github.com/jankramer) **Created:** 11/25/2012 **Status:** ✅ Merged **Merged:** 11/25/2012 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `DDC-2074` --- ### 📝 Commits (2) - [`9b78100`](https://github.com/doctrine/orm/commit/9b78100378725ae9f58a997020ab2da070544d06) [DDC-2074] Added test for PersistentCollection#clear. - [`5b3f544`](https://github.com/doctrine/orm/commit/5b3f54429aa01d4647e12c6a2f1010698f70844f) [DDC-2074] Fixed bug regarding clearing PC's without owner ### 📊 Changes **2 files changed** (+30 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/PersistentCollection.php` (+1 -1) ➕ `tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2074Test.php` (+29 -0) </details> ### 📄 Description When calling clear on a PC that has no owner (e.g. because it was cloned), it can't be deleted as there is no metadata available (that's essentially the exception mentioned in the ticket). In these cases, I think it shouldn't be scheduled for deletion, but please have a look as my knowledge of the ORM internals is limited. --- <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:59:24 +01:00
admin closed this issue 2026-01-22 15:59:24 +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#8324