[PR #256] [MERGED] When using a ManyToMany relationship no listener is notified about any change to the owning entity #7925

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/256
Author: @fran6co
Created: 1/12/2012
Status: Merged
Merged: 3/3/2012
Merged by: @beberlei

Base: masterHead: many_to_many_listeners


📝 Commits (2)

  • e7a6d87 When using a ManyToMany relationship no listener is notified about any change to the owning entity.
  • bab14bf UnitTest for ManyToMany update notification

📊 Changes

2 files changed (+85 additions, -0 deletions)

View changed files

📝 lib/Doctrine/ORM/UnitOfWork.php (+9 -0)
tests/Doctrine/Tests/ORM/Functional/ManyToManyEventTest.php (+76 -0)

📄 Description

What I'm doing with this patch is marking the entity for update when there is a modification in the ManyToMany relationship so the listeners are notified about it.

The main reason for this is for hooking up services like Solr or other indexers to update the entities even for ManyToMany relationships.

This is the followup for #255


🔄 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/256 **Author:** [@fran6co](https://github.com/fran6co) **Created:** 1/12/2012 **Status:** ✅ Merged **Merged:** 3/3/2012 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `many_to_many_listeners` --- ### 📝 Commits (2) - [`e7a6d87`](https://github.com/doctrine/orm/commit/e7a6d8799071fb33da9c2fcadfe68f829809593a) When using a ManyToMany relationship no listener is notified about any change to the owning entity. - [`bab14bf`](https://github.com/doctrine/orm/commit/bab14bfd240e8aa280a0094c700cc01e3f3d5cc8) UnitTest for ManyToMany update notification ### 📊 Changes **2 files changed** (+85 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/UnitOfWork.php` (+9 -0) ➕ `tests/Doctrine/Tests/ORM/Functional/ManyToManyEventTest.php` (+76 -0) </details> ### 📄 Description What I'm doing with this patch is marking the entity for update when there is a modification in the ManyToMany relationship so the listeners are notified about it. The main reason for this is for hooking up services like Solr or other indexers to update the entities even for ManyToMany relationships. This is the followup for #255 --- <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:35 +01:00
admin closed this issue 2026-01-22 15:57:35 +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#7925