[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

Sub-Tasks:
Key
Summary
Type
Status
Assignee
DDC-2850 Allow cascaded clearing of Entities a... Sub-task Resolved Guilherme Blanco  

 Description   

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.



 Comments   
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 Sat Oct 25 21:23:06 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.