mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Using ArrayCollection->clear over an entity marked to be persisted, doesn't create corresponding DELETE statements
#6326
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ferrastas on GitHub (Oct 9, 2019).
Originally assigned to: @ostrolucky on GitHub.
Bug Report
Summary
Since 2.6.4 using
clearover a collection usingDEFERRED_EXPLICITwill not create the correspondingDELETEstatements even when persisting the entity.Introduced in https://github.com/doctrine/orm/issues/7758
Current behavior
Using
clearover a collection usingDEFERRED_EXPLICITwill not create the correspondingDELETEstatements even when persisting the entity.How to reproduce
A failing test available in https://github.com/doctrine/orm/pull/7861
Expected behavior
Collection items should be removed for entities marked to be persisted.
@SenseException commented on GitHub (Oct 14, 2019):
Thank you for providing the failing test case 👍
@lcobucci commented on GitHub (Nov 15, 2019):
Handled by https://github.com/doctrine/orm/pull/7861
@paxal commented on GitHub (Nov 19, 2019):
Yes I'm the one to blame and I feed very sorry 🤦♂️
Hopefully everything is fine now 😅
Thanks !
@Ocramius commented on GitHub (Nov 19, 2019):
@paxal take it easy: regressions are normal, we all do our best to avoid them, but can't have everything in mind.