mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-145: Cascaded delete on a lazyloaded persistent collection #180
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 @doctrinebot on GitHub (Nov 13, 2009).
Jira issue originally created by user ablock:
It seems that if you call PersistentCollection#unwrap on a lazy loaded collection, you get nothing back (unless you initialize the collection first). Because of this, UnitOfWork#_cascadeRemove is "unwrapping" the collection before transversing it, and nothing gets deleted on the cascade.
@doctrinebot commented on GitHub (Nov 13, 2009):
Comment created by romanb:
Right, I think I made that change for all cascade methods but actually I think for *cascadeRemove initialization is actually intended. For the others it doesnt make sense.
@doctrinebot commented on GitHub (Nov 13, 2009):
Comment created by romanb:
Will need to write a functional test for this before I fix it by reverting the change for _cascadeRemove.
@doctrinebot commented on GitHub (Nov 13, 2009):
Issue was closed with resolution "Fixed"