mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2340: Using Criteria matching on non-initialized collections ignore changes made on loaded entities #2941
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Mar 7, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user mnapoli:
Given:
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.
@doctrinebot commented on GitHub (Mar 12, 2013):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Mar 12, 2013):
Comment created by @beberlei:
Fixed and merged for 2.3.3