repository class findOneBy not working while findAll is working
Author: remco-pcCreated Aug 7, 2026Updated Aug 9, 2026
Bug Report
$repository = $connection->manager->getRepository(Entity::class);
$node = $repository->findOneBy([
'email' => $input->email,
'isActive' => 1
]);$repository findAll is working, but findOneBy is returning null while it should return a record (it did before)
tested wikth criteria 'email' only or isActive but just returning null.
My repository class (generated)
<?php
namespace Repository;
use Doctrine\ORM\EntityRepository;
class UserRepository extends EntityRepository
{
}tried
doctrine orm:generate-proxies
Processing entity "Entity\Extension"
Processing entity "Entity\Application"
Processing entity "Entity\Profile"
Processing entity "Entity\User"
Processing entity "Entity\Task"
Processing entity "Entity\UserLogger"
Proxy classes generated to "/tmp/doctrine"but still no return
| Q | A |
|---|---|
| Doctrine Command Line Interface 3.6.8.0 |
Source: doctrine/orm