DDC-2340: Using Criteria matching on non-initialized collections ignore changes made on loaded entities #3046

doctrinebot opened this Issue Mar 7, 2013 · 2 comments

2 participants


Jira issue originally created by user mnapoli:


  • you have a non initialized collection (association between entities)
  • you have loaded some entities that are in that collection and changed some fields (without flushing)

If you do a matching using a Criteria on the collection (http://docs.doctrine-project.org/en/latest/reference/working-with-associations.html#filtering-collections), then the Criteria will be executed through a DB query. But the fields you changed are not updated in the DB, so if you filter/order on those fields, then the result of the filter() will be incorrect.

However, if your collection was initialized, the Criteria matching will be done in memory on the ArrayCollection and the result will be correct.

So we have the problem for Criteria filtering on non-initialized collections.


Issue was closed with resolution "Fixed"


Comment created by @beberlei:

Fixed and merged for 2.3.3

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.3.3 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment