mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-943: EntityRepository::findBy should support multiple values on criteria fetching #1174
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 (Dec 20, 2010).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user @guilhermeblanco:
Currently it is impossible to execute a multiple value findBy on EntityRepository.
So supposing we have a Foo entity, we can do this:
$foos = $em->getRepository('Foo')->findByName('value');But it is impossible to do:
$foos = $em->getRepository('Foo')->findByName(array('value1', 'value2'));We have most of the support done inside BasicEntityPersister, but the _getSelectConditionSQL restricts to a single value by doing:
$conditionSql .= ' = ?';at line 1150We can extend the support easily by detecting array value and adding an IN (...) condition on this case.
@doctrinebot commented on GitHub (Dec 20, 2010):
Comment created by @beberlei:
This is not going into 2.0 anymore
@doctrinebot commented on GitHub (Dec 24, 2010):
Comment created by @beberlei:
Schedule for 2.1, there are some gotachs here though.
@doctrinebot commented on GitHub (Mar 16, 2011):
Comment created by @beberlei:
Implemented as part of DDC-952
@doctrinebot commented on GitHub (Mar 16, 2011):
Issue was closed with resolution "Fixed"