Skip to content

When using a ManyToMany relationship no listener is notified about any change to the owning entity #256

Merged
merged 2 commits into from Mar 3, 2012

3 participants

@fran6co
fran6co commented Jan 12, 2012

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

@fran6co fran6co When using a ManyToMany relationship no listener is notified about an…
…y change to the owning entity.

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.
e7a6d87
@guilhermeblanco
Doctrine member

Are you able to create a testcase that cover this lack of listener's notification?
This change you made seems perfect, but we need to be sure how this may impact other sections of our codebase too.

@fran6co
fran6co commented Jan 13, 2012

The test cases run successfully now, not sure how else to make sure that this change doesn't impact in a weird way in the rest of the codebase. I'm going to create some test cases to check that my change is triggering the proper event for entities with a ManyToMany relationship.

@fran6co
fran6co commented Jan 13, 2012

The test case fails without my patch

@beberlei beberlei merged commit 9cddaf3 into doctrine:master Mar 3, 2012
@beberlei
Doctrine member
beberlei commented Mar 3, 2012

And merged back into 2.1 and 2.2, see http://www.doctrine-project.org/jira/browse/DDC-1678

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.