Jira issue originally created by user @beberlei:
This issue is created automatically through a Github pull request on behalf of sroddy:
...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.
Comment created by @beberlei:
A related Github Pull-Request [GH-437] was closed
Issue was closed with resolution "Fixed"
Comment created by @doctrinebot:
A related Github Pull-Request [GH-437] was closed: