DDC-2850: Allow cascaded clearing of Entities associated to the indicated Entity #3557

Open
opened 2026-01-22 14:22:26 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 11, 2013).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user holtkamp:

As described here, it would be nice to have associated Entities be cleared in case required and configured in such way. It seems the functionality is available already, but always disabled (noCascade => TRUE).
A secondary optional boolean parameter to the function would do:

https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L2342

public function clean($entityName = null, $noCascade = true)

https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L2369

$this->doDetach($entity, $visited, $noCascade);
Originally created by @doctrinebot on GitHub (Dec 11, 2013). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user holtkamp: As described [here](https://groups.google.com/forum/?fromgroups#!topic/doctrine-user/MhVOzoNIL60), it would be nice to have associated Entities be cleared in case required and configured in such way. It seems the functionality is available already, but always disabled (noCascade => TRUE). A secondary optional boolean parameter to the function would do: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L2342 ``` public function clean($entityName = null, $noCascade = true) ``` https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L2369 ``` $this->doDetach($entity, $visited, $noCascade); ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3557