Is it possible to apply criteria >=
condition in Doctrine findBy
. I have a query like this:
select * from source where id >= 10
I am looking to apply in following way which will return with reference to Object source.
$this->entityManager->getRepository(Source::class)->findBy(['id' ])
I can use createQueryBuilder
but it returns me array result. I need result in same format as above:
$qb = $this->createQueryBuilder('s')
->andWhere('s.id >= :id')
->setParameter('id', 10);
Expected Result:
0 => App\Entity\Source {#845
-id: 10
Can anybody help me?
Thanks in advance.