[PR #166] [MERGED] DDC-720 - Add support to flush only one entity through EntityManager#flush() #7801

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/166
Author: @beberlei
Created: 10/22/2011
Status: Merged
Merged: 10/23/2011
Merged by: @beberlei

Base: masterHead: DDC-720


📝 Commits (3)

  • f569a2a DDC-720 - Add support to flush only one entity (within cascade rules) through EntityManager#flush()
  • b910a48 DDC-720 - Wait, we should really test it only changes the passed entity.
  • 5d3298e DDC-720 - Correct mentioned issues by @asm89

📊 Changes

3 files changed (+240 additions, -9 deletions)

View changed files

📝 lib/Doctrine/ORM/EntityManager.php (+6 -2)
📝 lib/Doctrine/ORM/UnitOfWork.php (+65 -7)
📝 tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php (+169 -0)

📄 Description

Only flush the given entity according to a ruleset that keeps the UoW consistent.

  1. All entities scheduled for insertion, (orphan) removals and changes in collections are processed as well!
  2. Read Only entities are skipped.
  3. Proxies are skipped.
  4. Only if entity is properly managed.

🔄 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/166 **Author:** [@beberlei](https://github.com/beberlei) **Created:** 10/22/2011 **Status:** ✅ Merged **Merged:** 10/23/2011 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `DDC-720` --- ### 📝 Commits (3) - [`f569a2a`](https://github.com/doctrine/orm/commit/f569a2a389264adefbfc9aca03e67a83c131a087) DDC-720 - Add support to flush only one entity (within cascade rules) through EntityManager#flush() - [`b910a48`](https://github.com/doctrine/orm/commit/b910a487c54b4c3dbe8603fc0857184d5083b13f) DDC-720 - Wait, we should really test it only changes the passed entity. - [`5d3298e`](https://github.com/doctrine/orm/commit/5d3298e706b1457ca8be02469b00ef219afe84e6) DDC-720 - Correct mentioned issues by @asm89 ### 📊 Changes **3 files changed** (+240 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/EntityManager.php` (+6 -2) 📝 `lib/Doctrine/ORM/UnitOfWork.php` (+65 -7) 📝 `tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php` (+169 -0) </details> ### 📄 Description Only flush the given entity according to a ruleset that keeps the UoW consistent. 1. All entities scheduled for insertion, (orphan) removals and changes in collections are processed as well! 2. Read Only entities are skipped. 3. Proxies are skipped. 4. Only if entity is properly managed. --- <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:56 +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#7801