[DDC-1278] EntityManager::clear($entity) support Created: 14/Jul/11  Updated: 16/Oct/11  Resolved: 16/Oct/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: None
Fix Version/s: 2.2
Security Level: All

Type: New Feature Priority: Major
Reporter: Guilherme Blanco Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

DDC-2850 Allow cascaded clearing of Entities a... Sub-task Resolved Guilherme Blanco  


It was originally planned that EntityManager::clear() would also support an optional argument - $entity -, which would remove only the reference to an existent entity (maybe also consider a new cascade to allow graph clearing) from UoW.
Currently, it's win or wall. You can't clear a specific portion of Entities.

Comment by Dominik Liebler [ 13/Aug/11 ]

I implemented this (https://github.com/doctrine/doctrine2/pull/104) but forgot to consider also cascade detach. What do you think about adding an additional parameter $entityName to both cascadeDetach() and doDetach()?

Comment by Benjamin Eberlei [ 16/Oct/11 ]

Merged into 2.2-master

Comment by Alexander [ 16/Oct/11 ]

By merging the new PR: https://github.com/doctrine/doctrine2/pull/105.

Generated at Mon Nov 30 06:38:19 EST 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.