Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1278

EntityManager::clear($entity) support

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      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.

        Activity

        Hide
        Alexander added a comment -
        Show
        Alexander added a comment - By merging the new PR: https://github.com/doctrine/doctrine2/pull/105 .
        Hide
        Benjamin Eberlei added a comment -

        Merged into 2.2-master

        Show
        Benjamin Eberlei added a comment - Merged into 2.2-master
        Hide
        Dominik Liebler added a comment -

        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()?

        Show
        Dominik Liebler added a comment - 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()?

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Guilherme Blanco
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: