Orm: Using `ArrayCollection->clear` over an entity marked to be persisted, doesn't create corresponding `DELETE` statements

Created on 9 Oct 2019  路  4Comments  路  Source: doctrine/orm

Bug Report

| Q | A
|------------ | ------
| BC Break | yes/no
| Version | 2.6.4

Summary

Since 2.6.4 using clear over a collection using DEFERRED_EXPLICIT will not create the corresponding DELETE statements even when persisting the entity.
Introduced in https://github.com/doctrine/orm/issues/7758

Current behavior

Using clear over a collection using DEFERRED_EXPLICIT will not create the corresponding DELETE statements 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.

Bug Regression

Most helpful comment

@paxal take it easy: regressions are normal, we all do our best to avoid them, but can't have everything in mind.

All 4 comments

Thank you for providing the failing test case :+1:

Yes I'm the one to blame and I feed very sorry :man_facepalming:
Hopefully everything is fine now :sweat_smile:
Thanks !

@paxal take it easy: regressions are normal, we all do our best to avoid them, but can't have everything in mind.

Was this page helpful?
0 / 5 - 0 ratings