mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
incorrect unit of work when using association class #7304
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 @wickedOne on GitHub (Jan 28, 2024).
Bug Report
Summary
the unit of work appearss "polluted" after persist -> flush -> clear -> find -> remove -> flush routine
Current behavior
when a parent class has a child collection using an association class, the unit of work contains proxy classes after removal of the entities when the entity manager is cleared in between persisting and removing. nevertheless, these entities are no longer present in the database
How to reproduce
check the code in this POC to reproduce
Expected behavior
expected behaviour would be the proxy classes not to be present in the unit of work after the second flush