[PR #1065] [DDC-3179] EntityNotFoundException on the postRemove event if the entity is a proxy #9115

Closed
opened 2026-01-22 16:03:15 +01:00 by admin · 0 comments
Owner

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.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1065 **State:** closed **Merged:** Yes --- This PR tries to fix [DDC-3179](http://www.doctrine-project.org/jira/browse/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.
admin added the pull-request label 2026-01-22 16:03:15 +01:00
admin closed this issue 2026-01-22 16:03:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9115