Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-145

Cascaded delete on a lazyloaded persistent collection

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA3
    • Fix Version/s: 2.0-ALPHA4
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      It seems that if you call PersistentCollection#unwrap on a lazy loaded collection, you get nothing back (unless you initialize the collection first). Because of this, UnitOfWork#_cascadeRemove is "unwrapping" the collection before transversing it, and nothing gets deleted on the cascade.

        Activity

        Hide
        Roman S. Borschel added a comment -

        Right, I think I made that change for all _cascade* methods but actually I think for _cascadeRemove initialization is actually intended. For the others it doesnt make sense.

        Show
        Roman S. Borschel added a comment - Right, I think I made that change for all _cascade* methods but actually I think for _cascadeRemove initialization is actually intended. For the others it doesnt make sense.
        Hide
        Roman S. Borschel added a comment -

        Will need to write a functional test for this before I fix it by reverting the change for _cascadeRemove.

        Show
        Roman S. Borschel added a comment - Will need to write a functional test for this before I fix it by reverting the change for _cascadeRemove.

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Avi Block
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: