Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1189

PersistentCollection::clear() does not cause the collection to be initialized

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Git Master
    • Fix Version/s: 2.0.7
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      If clear() is called on an uninitialized PersistentCollection it needs to set the collection to be initialized.

      An example of where this can cause problems:

      • Call clear() on an uninitialized collection
      • Check if an entity is in that collection using contains($entity)

      This can return a false positive if the entity was previously in the collection.

        Issue Links

          Activity

          Hide
          Benjamin Eberlei added a comment -

          Fixed.

          Show
          Benjamin Eberlei added a comment - Fixed.

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Dave Keen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: