Skip to content


DDC-1189: PersistentCollection::clear() does not cause the collection to be initialized #1793

doctrinebot opened this Issue · 3 comments

2 participants


Jira issue originally created by user ccapndave:

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.


Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.7 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.