-
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
[Documentation] Extra lazy docs do not mention removeElement eagerness #7765
Comments
As orm/lib/Doctrine/ORM/PersistentCollection.php Line 362 in 0476201
could be of two types
I think the docs should point out this situation - where applicable - both in https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/working-with-associations.html#orphan-removal and https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/tutorials/extra-lazy-associations.html#extra-lazy-associations BTW the fact that As said in #7852 that's now closed, I'm willing to work on this PR if think is worthy. |
If I see this correctly, one viable workaround is - and could well be mentioned in the docs - that if one needs the event listener to be called, one can replace
with
... which will load the collection, but nevertheless I can imagine many people relying on the event listeners being called, so this is the only way to go.... |
The intent of |
Closing as behaviour was changed in #7940 |
TIL that not initialized collection in
EXTRA_LAZY
mode will remove element with->removeElement()
from the database without waiting for aflush
. I think it should be mentioned in the docsorm/lib/Doctrine/ORM/PersistentCollection.php
Lines 355 to 365 in 0476201
The text was updated successfully, but these errors were encountered: