Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-1278 EntityManager::clear($entity) support
  3. DDC-2850

Allow cascaded clearing of Entities associated to the indicated Entity

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.5
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      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);
      

        Activity

        Show
        holtkamp Menno Holtkamp added a comment - PR: https://github.com/doctrine/doctrine2/pull/995 Auto-created issue: http://www.doctrine-project.org/jira/browse/DDC-3060
        Hide
        doctrinebot Doctrine Bot added a comment -

        A related Github Pull-Request [GH-995] was closed:
        https://github.com/doctrine/doctrine2/pull/995

        Show
        doctrinebot Doctrine Bot added a comment - A related Github Pull-Request [GH-995] was closed: https://github.com/doctrine/doctrine2/pull/995
        Show
        guilhermeblanco Guilherme Blanco added a comment - As of https://github.com/doctrine/doctrine2/commit/1cd0b26a40dc22b0d11b1860eb058ab9cdc29f36 this issue is now fixed.

          People

          • Assignee:
            guilhermeblanco Guilherme Blanco
            Reporter:
            holtkamp Menno Holtkamp
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: