Jira issue originally created by user @guilhermeblanco:
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 created by domnikl:
I implemented this (#104) but forgot to consider also cascade detach. What do you think about adding an additional parameter $entityName to both cascadeDetach() and doDetach()?
Comment created by @beberlei:
Merged into 2.2-master
Issue was closed with resolution "Fixed"
Comment created by @asm89:
By merging the new PR: #105.