[PR #7743] fix: enable usage of findBy with Criteria[] #10629

Open
opened 2026-01-22 16:08:10 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/7743

State: closed
Merged: No


This pull request shall enable something like

$criteria = new Criteria();
$criteria->where(Criteria::expr()->lt('id', $param));

return $this->entityManager
    ->getRepository(MyEntity::class)
    ->findBy([$criteria]);

Criteria is currently ignored in \Doctrine\ORM\Persisters\Entity\BasicEntityPersister::getSelectConditionSQL() and \Doctrine\ORM\Persisters\Entity\BasicEntityPersister::getSelectConditionStatementSQL()

**Original Pull Request:** https://github.com/doctrine/orm/pull/7743 **State:** closed **Merged:** No --- This pull request shall enable something like ``` $criteria = new Criteria(); $criteria->where(Criteria::expr()->lt('id', $param)); return $this->entityManager ->getRepository(MyEntity::class) ->findBy([$criteria]); ``` Criteria is currently ignored in `\Doctrine\ORM\Persisters\Entity\BasicEntityPersister::getSelectConditionSQL()` and `\Doctrine\ORM\Persisters\Entity\BasicEntityPersister::getSelectConditionStatementSQL()`
admin added the pull-request label 2026-01-22 16:08:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#10629