mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #1065] [DDC-3179] EntityNotFoundException on the postRemove event if the entity is a proxy #9115
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?
Original Pull Request: https://github.com/doctrine/orm/pull/1065
State: closed
Merged: Yes
This PR tries to fix DDC-3179.
I'm not sure if it is the way to go as this PR has a big drawback: it always loads proxies which needs to be removed regardless if there is an postRemove event for it. Anyway, there is no way to determine if there is an event for a specific entity in a lifecycle callback context.
For now, to fix it in our side, we have registered a listener on the preRemove event and load the proxy there.