DDC-145: Cascaded delete on a lazyloaded persistent collection #180

Closed
opened 2026-01-22 12:29:43 +01:00 by admin · 3 comments
Owner

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.

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.
admin added the Bug label 2026-01-22 12:29:43 +01:00
admin closed this issue 2026-01-22 12:29:44 +01:00
Author
Owner

@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: 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.
Author
Owner

@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): Comment created by romanb: Will need to write a functional test for this before I fix it by reverting the change for _cascadeRemove.
Author
Owner

@doctrinebot commented on GitHub (Nov 13, 2009):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Nov 13, 2009): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#180