DDC-2015: [GH-437] Fixes PersistentCollection::matching() when collection is not initialize... #2537

Closed
opened 2026-01-22 13:56:11 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 7, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of sroddy:

Url: https://github.com/doctrine/doctrine2/pull/437

Message:

...d and there are NEW entities in the collection.

If you have a PersistentCollection not already initialized and you add something to it and if you call matching() on it, that method doesn't return the elements you have just added even if they match the criteria.

This fixes the behaviour checking for any matching element that is NEW and merging it in the returned ArrayCollection.

Originally created by @doctrinebot on GitHub (Sep 7, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: This issue is created automatically through a Github pull request on behalf of sroddy: Url: https://github.com/doctrine/doctrine2/pull/437 Message: ...d and there are NEW entities in the collection. If you have a PersistentCollection not already initialized and you add something to it and if you call matching() on it, that method doesn't return the elements you have just added even if they match the criteria. This fixes the behaviour checking for any matching element that is NEW and merging it in the returned ArrayCollection.
admin added the Bug label 2026-01-22 13:56:11 +01:00
admin closed this issue 2026-01-22 13:56:11 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 7, 2012):

Comment created by @beberlei:

A related Github Pull-Request [GH-437] was closed
https://github.com/doctrine/doctrine2/pull/437

@doctrinebot commented on GitHub (Sep 7, 2012): Comment created by @beberlei: A related Github Pull-Request [GH-437] was closed https://github.com/doctrine/doctrine2/pull/437
Author
Owner

@doctrinebot commented on GitHub (Sep 17, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Sep 17, 2012): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Dec 20, 2013):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-437] was closed:
https://github.com/doctrine/dbal/pull/437

@doctrinebot commented on GitHub (Dec 20, 2013): Comment created by @doctrinebot: A related Github Pull-Request [GH-437] was closed: https://github.com/doctrine/dbal/pull/437
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2537