mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 09:23:20 +02:00
UnitOfWork::isScheduledForDelete ignores UnitOfWork::$orphanRemovals #4976
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 @mtal on GitHub (Jan 18, 2016).
The UnitOfWork::isScheduledForDelete returns false for entity that will be deleted by orphan (contains in UnitOfWork::$orphanRemovals)
There is no accessors to UnitOfWork::$orphanRemovals variable
@Ocramius commented on GitHub (Jan 20, 2016):
We wouldn't add accessors for
UnitOfWork#$orphanRemovalsanyway.Could you check if any API is relying on
Doctrine\ORM\UnitOfWork#isScheduledForDelete(), and can we add orphan removals to that particular API, eventually?Also suggested: check if the Gedmo softdeleteable extension provides a way to soft-delete orphan removals (and where it is done): it may give you hints about possible workarounds
@mtal commented on GitHub (Jan 20, 2016):
orphanRemovals are fully hidden inside onFlush events.
but it is still scheduled deletions so getScheduledEntityDeletions and isScheduledForDelete must see it.