DDC-3997: Add some helpers on persistentCollection to get some datas easily #4880

Closed
opened 2026-01-22 14:51:24 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Nov 13, 2015).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user sebastien.bramille@gmail.com:

Hello,

I would like to add some helpers in the PersistentCollection class (like as EntityRepository helpers) to easily get some entities.

Example :

  • findOneBy{$EntityMethod}(array $criteria) (using **call magic method)
  • findBy{$EntityMethod}(array $criteria) (using **call magic method)
  • findOneBy(array $criteria, array $orderBy = null)
  • findBy (array $criteria, array $orderBy = null, $limit = null, $offset = null)

I have some time to spend on it, are you interested by this feature and is there any chance to merge it on Doctrine ?

Originally created by @doctrinebot on GitHub (Nov 13, 2015). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user sebastien.bramille@gmail.com: Hello, ``` I would like to add some helpers in the PersistentCollection class (like as EntityRepository helpers) to easily get some entities. ``` Example : - findOneBy{$EntityMethod}(array $criteria) (using **call magic method) - findBy{$EntityMethod}(array $criteria) (using **call magic method) - findOneBy(array $criteria, array $orderBy = null) - findBy (array $criteria, array $orderBy = null, $limit = null, $offset = null) I have some time to spend on it, are you interested by this feature and is there any chance to merge it on Doctrine ?
admin added the New Feature label 2026-01-22 14:51:24 +01:00
admin closed this issue 2026-01-22 14:51:24 +01:00
Author
Owner

@beberlei commented on GitHub (Feb 16, 2020):

This can be done using extra lazy collection and matching Criteria API.

@beberlei commented on GitHub (Feb 16, 2020): This can be done using extra lazy collection and `matching` Criteria API.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4880