-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hotfix/#1169 extra lazy one to many should not delete referenced entities #1281
Hotfix/#1169 extra lazy one to many should not delete referenced entities #1281
Conversation
…ociated values when they are removed, but just update the owning side
…azy specific tests (some DELETE operations became UPDATE operations)
… an extra-lazy collection still updates the owning side values
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-3536 We use Jira to track the state of pull requests and the versions they got |
looks good to me |
@stof I'll provide a 2.4 PR as well in a few. |
/** | ||
* @group DDC-3343 | ||
*/ | ||
public function testRemovesManagedElementFromOneToManyExtraLazyCollection() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are actually on the wrong file.
…o EXTRA_LAZY collection behavior
* | ||
* @param PersistentCollection $collection | ||
*/ | ||
protected function evictCollectionCache(PersistentCollection $collection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured that none of the EXTRA_LAZY
stuff was actually updating the collection-related caches. This change fixes that
…-many-should-not-delete-referenced-entities Hotfix/#1169 extra lazy one to many should not delete referenced entities
@@ -163,7 +164,20 @@ public function removeElement(PersistentCollection $collection, $element) | |||
$mapping = $collection->getMapping(); | |||
$persister = $this->uow->getEntityPersister($mapping['targetEntity']); | |||
|
|||
return $persister->delete($element); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was intended to be used only be used with orphanRemoval=true
, not always like it is now.
To recap, I need to fix following:
|
Provided required hotfixes via #1288 |
This is an alternate fix for #1169 (DDC-3343 http://www.doctrine-project.org/jira/browse/DDC-3343)